add godotenv
This commit is contained in:
parent
a7c9333685
commit
48ccd03be5
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@ bin
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
|
||||
/.env
|
||||
|
||||
@ -20,6 +20,7 @@ var rootCmd = &cobra.Command{
|
||||
func init() {
|
||||
cobra.OnInitialize(initConfig)
|
||||
viper.SetDefault("port", 8000)
|
||||
viper.SetDefault("env", "production")
|
||||
rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c",
|
||||
"", "Full path to config file")
|
||||
}
|
||||
|
||||
1
go.mod
1
go.mod
@ -3,6 +3,7 @@ module git.bloy.org/mike/gotest
|
||||
go 1.12
|
||||
|
||||
require (
|
||||
github.com/gorilla/mux v1.7.3
|
||||
github.com/kyoh86/xdg v1.0.0
|
||||
github.com/spf13/cobra v0.0.5
|
||||
github.com/spf13/viper v1.3.2
|
||||
|
||||
2
go.sum
2
go.sum
@ -11,6 +11,8 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo
|
||||
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
|
||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
||||
github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
|
||||
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
|
||||
github.com/kyoh86/xdg v1.0.0 h1:TD1layQ0epNApNwGRblnQnT3S/2UH/gCQN1cmXWotvE=
|
||||
github.com/kyoh86/xdg v1.0.0/go.mod h1:Z5mDqe0fxyxn3W2yTxsBAOQqIrXADQIh02wrTnaRM38=
|
||||
github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY=
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user