This repository has been archived on 2024-08-02. You can view files and clone it, but cannot push or open issues or pull requests.
orion/cmd/server/config.go

25 lines
374 B
Go

package main
import (
"github.com/caarlos0/env"
)
type config struct {
HTTPHost string `env:"ORION_HTTP_HOST"`
HTTPPort string `env:"ORION_HTTP_PORT"`
}
func overwriteFromEnv(conf *config) error {
if err := env.Parse(conf); err != nil {
return err
}
return nil
}
func newDefaultConfig() *config {
return &config{
HTTPHost: "0.0.0.0",
HTTPPort: "8888",
}
}