21 lines
351 B
Go
21 lines
351 B
Go
package config
|
|
|
|
type Config struct {
|
|
Service Service `json:"service" yaml:"service"`
|
|
}
|
|
|
|
func NewConfig() (*Config, error) {
|
|
var err error
|
|
return &Config{
|
|
Service: Service{
|
|
Address: "0.0.0.0",
|
|
Port: 1025,
|
|
},
|
|
}, err
|
|
}
|
|
|
|
type Service struct {
|
|
Address string `json:"address" yaml:"address"`
|
|
Port int64 `json:"port" yaml:"port"`
|
|
}
|