cmd

package
v0.0.0-...-7134dbd Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MajorVersion of the server
	MajorVersion = 0
	// MinorVersion of the server
	MinorVersion = 1
	// Product name of the server
	Product = "Pass Around Novel Server"
)

Variables

View Source
var (

	// Verbose is the number of verbosity levels requested by the user
	Verbose int
	// Quiet is the number of quiet levels requested by the user
	Quiet int
)
View Source
var (

	// ConfigUpdated contains handlers to call once the configuration file changes or is loaded
	ConfigUpdated []func()
)

Functions

func AddCommand

func AddCommand(cmd *cobra.Command)

AddCommand adds a subcommand to Cobra

func Execute

func Execute()

Execute runs the command-line flag parser and starts the program

func GetBool

func GetBool(key string, val *bool)

GetBool reads a boolean from the configuration file

func GetDuration

func GetDuration(key string, val *time.Duration)

GetDuration reads a duration from the configuration file

func GetFloat64

func GetFloat64(key string, val *float64)

GetFloat64 reads a 64-bit float from the configuration file

func GetInt

func GetInt(key string, val *int)

GetInt reads an integer from the configuration file

func GetIntSlice

func GetIntSlice(key string, val *[]int)

GetIntSlice reads an integer array from the configuration file

func GetString

func GetString(key string, val *string)

GetString reads a string from the configuration file

func GetStringMapBool

func GetStringMapBool(key string, val *map[string]bool)

GetStringMapBool reads a boolean dictionary from the configuration file

func GetStringMapInt

func GetStringMapInt(key string, val *map[string]int)

GetStringMapInt reads an int dictionary from the configuration file

func GetStringMapString

func GetStringMapString(key string, val *map[string]string)

GetStringMapString reads a string dictionary from the configuration file

func GetStringMapStringSlice

func GetStringMapStringSlice(key string, val *map[string][]string)

GetStringMapStringSlice reads a string array dictionary from the configuration file

func GetStringSlice

func GetStringSlice(key string, val *[]string)

GetStringSlice reads a string array from the configuration file

func GetTime

func GetTime(key string, val *time.Time)

GetTime reads a time from the configuration file

Types

This section is empty.

Jump to

Keyboard shortcuts

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