...

Package flag

import "github.com/bazelbuild/bazel-gazelle/flag"
Overview
Index

Overview ▾

Package flag provides some general-purpose types which satisfy the flag.Value interface.

type AllowedStringFlag

type AllowedStringFlag struct {
    Allowed []string
    Value   *string
}

func (*AllowedStringFlag) Set

func (f *AllowedStringFlag) Set(v string) error

func (*AllowedStringFlag) String

func (f *AllowedStringFlag) String() string

type ExplicitFlag

ExplicitFlag is a string flag that tracks whether it was set.

type ExplicitFlag struct {
    IsSet *bool
    Value *string
}

func (*ExplicitFlag) Set

func (f *ExplicitFlag) Set(value string) error

func (*ExplicitFlag) String

func (f *ExplicitFlag) String() string

type MultiFlag

MultiFlag collects repeated string flags into a slice.

type MultiFlag struct {
    IsSet  *bool
    Values *[]string
}

func (*MultiFlag) Set

func (m *MultiFlag) Set(v string) error

func (*MultiFlag) String

func (m *MultiFlag) String() string