Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultCommandName = "go-mod" DefaultBaseDir = constant.CurrentDir DefaultModParent = "parent" DefaultModChild = "child" DefaultModAll = "all" DefaultModDir = "./" DefaultModName = constant.EmptyString DefaultModVersion = constant.EmptyString DefaultModUseCompileVersion = false )
global constant
View Source
const ( LogLevelKey = "log.level" LogFormatKey = "log.format" ModDirKey = "mod.dir" ModNameKey = "mod.name" ModVersionKey = "mod.version" ModUseCompileVersionKey = "mod.useCompileVersion" )
configuration constant
Variables ¶
View Source
var ( ValidLogLevels = []string{"debug", "info", "warn", "warning", "error", "fatal"} ValidLogFormats = []string{"text", "json"} )
Functions ¶
func SetDefaultConfig ¶
func SetDefaultConfig(baseDir string)
SetDefaultConfig set default configuration, it is the lowest priority
func TrimSpaceOfArg ¶
TrimSpaceOfArg trims spaces of given argument
func ValidateConfig ¶
func ValidateConfig() (err error)
ValidateConfig validates if the configuration is valid
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.