chore(config): remove zerolog

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2022-08-13 13:12:38 +08:00
committed by Jason Song
parent b83f36674b
commit 9225a3a856
3 changed files with 38 additions and 67 deletions

18
cmd/config.go Normal file
View File

@ -0,0 +1,18 @@
package cmd
import "github.com/kelseyhightower/envconfig"
type (
// Config provides the system configuration.
Config struct {
Debug bool `envconfig:"DRONE_DEBUG"`
Trace bool `envconfig:"DRONE_TRACE"`
}
)
// fromEnviron returns the settings from the environment.
func fromEnviron() (Config, error) {
cfg := Config{}
err := envconfig.Process("", &cfg)
return cfg, err
}