mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
chore(config): remove zerolog
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
b83f36674b
commit
9225a3a856
3 changed files with 38 additions and 67 deletions
18
cmd/config.go
Normal file
18
cmd/config.go
Normal 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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue