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)
- func ToFloat64(val string) float64
- func ToUint64(val string) uint64
- type GlobalOptions
- func (opts *GlobalOptions) FinishParse(args []string, caches map[string]bool) *rpc.Connection
- func (opts *GlobalOptions) FinishParseApi(w http.ResponseWriter, r *http.Request, caches map[string]bool) *rpc.Connection
- func (opts *GlobalOptions) OutputOpts() output.OutputOptions
- func (opts *GlobalOptions) OutputOptsWithExtra(extra map[string]interface{}) output.OutputOptions
- 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[string]bool) *rpc.Connection
func (*GlobalOptions) FinishParseApi ¶
func (opts *GlobalOptions) FinishParseApi(w http.ResponseWriter, r *http.Request, caches map[string]bool) *rpc.Connection
func (*GlobalOptions) OutputOpts ¶
func (opts *GlobalOptions) OutputOpts() output.OutputOptions
func (*GlobalOptions) OutputOptsWithExtra ¶
func (opts *GlobalOptions) OutputOptsWithExtra(extra map[string]interface{}) output.OutputOptions
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.