mirror of
https://gitea.com/gitea/act_runner.git
synced 2024-12-28 11:58:20 +01:00
4eb5213294
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
19 lines
381 B
Go
19 lines
381 B
Go
package cmd
|
|
|
|
import "github.com/kelseyhightower/envconfig"
|
|
|
|
type (
|
|
// Config provides the system configuration.
|
|
Config struct {
|
|
Debug bool `envconfig:"GITEA_DEBUG"`
|
|
Trace bool `envconfig:"GITEA_TRACE"`
|
|
}
|
|
)
|
|
|
|
// fromEnviron returns the settings from the environment.
|
|
func fromEnviron() (Config, error) {
|
|
cfg := Config{}
|
|
err := envconfig.Process("", &cfg)
|
|
return cfg, err
|
|
}
|