flag

package
v0.0.202 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dca

func Dca() bool

--dca (aka dollar-cost-averaging)

func Debug

func Debug() bool

--debug

func Dip

func Dip(def float64) (float64, error)

--dip=[0..99]

func Dist added in v0.0.195

func Dist(def int64) (int64, error)

--dist=X

func Exists

func Exists(name string) bool

Exists() determines if a flag exists, even if it doesn't have a value

func Interactive

func Interactive() bool

func Listen

func Listen() bool

when included, then the bot runs as a local web server and is listening to a port

func Max

func Max() (float64, error)

--max=X

func Min

func Min() (float64, error)

--min=X

func Pip

func Pip(def float64) (float64, error)

--pip=[dip..100]

func Sandbox

func Sandbox() bool

--sandbox=[Y|N]

func Set

func Set(name, value string)

func Strict

func Strict() bool

when included, then the bot will respect the --dip setting (or the default 5% value) and not be smart about it.

Types

type Flag

type Flag struct {
	Exists bool
	// contains filtered or unexported fields
}

func Get

func Get(name string) *Flag

Get() finds a named flag in the args list and returns its value

func New

func New(exists bool, val string) *Flag

func (*Flag) Contains

func (self *Flag) Contains(value string) bool

func (*Flag) ContainsEx

func (self *Flag) ContainsEx(sep, value string) bool

func (*Flag) Float64

func (self *Flag) Float64() (float64, error)

func (*Flag) Int64

func (self *Flag) Int64() (int64, error)

func (*Flag) Split

func (self *Flag) Split() []string

func (*Flag) SplitEx

func (self *Flag) SplitEx(sep string) []string

func (*Flag) String

func (self *Flag) String() string

Jump to

Keyboard shortcuts

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