globals

package
v0.0.0-...-2a3d9f8 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2024 License: GPL-3.0 Imports: 18 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)

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

Jump to

Keyboard shortcuts

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