You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
380 B
Go
17 lines
380 B
Go
package config
|
|
|
|
import "github.com/kelseyhightower/envconfig"
|
|
|
|
type ServiceConfig struct {
|
|
LogLevel string `default:"INFO"`
|
|
Port int `default:"5002"`
|
|
DatabaseUri string `envconfig:"DATABASE_URI" required:"true"`
|
|
Env string `default:"dev"`
|
|
}
|
|
|
|
func GetServiceConfig() ServiceConfig {
|
|
var sc ServiceConfig
|
|
envconfig.MustProcess("PULLEY", &sc)
|
|
return sc
|
|
}
|