globals

package
v0.0.0-...-3f8eaf4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package globals handles command line options that are available to all tools

Index

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)

func ToFloat64

func ToFloat64(val string) float64

func ToUint64

func ToUint64(val string) uint64

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL