2022-08-13 06:12:38 +01:00
|
|
|
package cmd
|
|
|
|
|
|
|
|
import "github.com/kelseyhightower/envconfig"
|
|
|
|
|
|
|
|
type (
|
|
|
|
// Config provides the system configuration.
|
|
|
|
Config struct {
|
2022-08-13 07:15:21 +01:00
|
|
|
Debug bool `envconfig:"GITEA_DEBUG"`
|
|
|
|
Trace bool `envconfig:"GITEA_TRACE"`
|
2022-08-13 06:12:38 +01:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
// fromEnviron returns the settings from the environment.
|
|
|
|
func fromEnviron() (Config, error) {
|
|
|
|
cfg := Config{}
|
|
|
|
err := envconfig.Process("", &cfg)
|
|
|
|
return cfg, err
|
|
|
|
}
|