* WIP on auto-generating CLi * WIP * WIP * WIP * add pagination.go * handle more flag types * WIP on refactoring * WIP * working tests * add docs * echo all flags * add repeated tests * remove comment * fix compositeListValue issue Co-authored-by: Anil Kumar Kammari <anil@vitwit.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
21 lines
483 B
Go
21 lines
483 B
Go
package flag
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/spf13/pflag"
|
|
"google.golang.org/protobuf/reflect/protoreflect"
|
|
|
|
"github.com/cosmos/cosmos-sdk/client/v2/internal/util"
|
|
)
|
|
|
|
func (b *Builder) bindPageRequest(ctx context.Context, flagSet *pflag.FlagSet, field protoreflect.FieldDescriptor) FieldValueBinder {
|
|
handler := b.AddMessageFlags(
|
|
ctx,
|
|
flagSet,
|
|
util.ResolveMessageType(b.TypeResolver, field.Message()),
|
|
Options{Prefix: "page-"},
|
|
)
|
|
return simpleValueBinder{handler}
|
|
}
|