Documentation ¶
Index ¶
- Variables
- func Estimate(name string) func()
- func HidePass(link string) string
- func InitConfig(configFile string) error
- func InitEnv(config *viper.Viper)
- func Sanitize(str string) string
- func StartWithDefault()
- func StartWithFlags(fs *flag.FlagSet, args []string)
- func Sub(config *viper.Viper, name string) *viper.Viper
- func ValidateHTTPResp(resp *http.Response, bodyLen int) error
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = viper.New()
Config is a viper based application config
View Source
var Log = log.Logger
Log is applications logger
Functions ¶
func Estimate ¶ added in v0.2.1
func Estimate(name string) func()
Estimate estimates and logs execution duration sample: defer goapp.Estimate("function")()
func InitConfig ¶
InitConfig tries to load config.yml from exe's dir
func StartWithDefault ¶
func StartWithDefault()
StartWithDefault default app initialization function Tries to load config from commandline option '-c' panics on error
func StartWithFlags ¶
StartWithFlags app initialization function with flagset panics on error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.