Documentation
¶
Overview ¶
Package globals handles command line options that are available to all tools
Index ¶
- func InitGlobals(whoAmI string, cmd *cobra.Command, opts *GlobalOptions, c caps.Capability)
- func SetDefaults(opts *GlobalOptions)
- type GlobalOptions
- func (opts *GlobalOptions) FinishParse(args []string, caches map[walk.CacheType]bool) *rpc.Connection
- func (opts *GlobalOptions) FinishParseApi(w io.Writer, values url.Values, caches map[walk.CacheType]bool) *rpc.Connection
- func (opts *GlobalOptions) OutputOpts() output.OutputOptions
- func (opts *GlobalOptions) OutputOptsWithExtra(extraOpts map[string]any) output.OutputOptions
- func (opts *GlobalOptions) ShouldLoadNames(force bool) bool
- func (opts *GlobalOptions) ShowProgress() bool
- func (opts *GlobalOptions) ShowProgressNotTesting() bool
- func (opts *GlobalOptions) TestLog()
- func (opts *GlobalOptions) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitGlobals ¶
func InitGlobals(whoAmI string, cmd *cobra.Command, opts *GlobalOptions, c caps.Capability)
TODO: These options should be in a data file
func SetDefaults ¶
func SetDefaults(opts *GlobalOptions)
Types ¶
type GlobalOptions ¶
type GlobalOptions struct {
Wei bool `json:"wei,omitempty"`
Ether bool `json:"ether,omitempty"`
Help bool `json:"help,omitempty"`
File string `json:"file,omitempty"`
Version bool `json:"version,omitempty"`
Noop bool `json:"noop,omitempty"`
NoColor bool `json:"noColor,omitempty"`
Cache bool `json:"cache,omitempty"`
Decache bool `json:"decache,omitempty"`
Caps caps.Capability `json:"-"`
output.OutputOptions
}
func (*GlobalOptions) FinishParse ¶
func (opts *GlobalOptions) FinishParse(args []string, caches map[walk.CacheType]bool) *rpc.Connection
func (*GlobalOptions) FinishParseApi ¶
func (opts *GlobalOptions) FinishParseApi(w io.Writer, values url.Values, caches map[walk.CacheType]bool) *rpc.Connection
func (*GlobalOptions) OutputOpts ¶
func (opts *GlobalOptions) OutputOpts() output.OutputOptions
func (*GlobalOptions) OutputOptsWithExtra ¶
func (opts *GlobalOptions) OutputOptsWithExtra(extraOpts map[string]any) output.OutputOptions
func (*GlobalOptions) ShouldLoadNames ¶
func (opts *GlobalOptions) ShouldLoadNames(force bool) bool
func (*GlobalOptions) ShowProgress ¶
func (opts *GlobalOptions) ShowProgress() bool
func (*GlobalOptions) ShowProgressNotTesting ¶
func (opts *GlobalOptions) ShowProgressNotTesting() bool
func (*GlobalOptions) TestLog ¶
func (opts *GlobalOptions) TestLog()
func (*GlobalOptions) Validate ¶
func (opts *GlobalOptions) Validate() error
Click to show internal directories.
Click to hide internal directories.