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