forked from External/ergo
Support network name
This commit is contained in:
parent
c88cd328f8
commit
a013205fd1
3 changed files with 20 additions and 6 deletions
|
|
@ -21,14 +21,18 @@ func (conf *PassConfig) PasswordBytes() []byte {
|
|||
}
|
||||
|
||||
type Config struct {
|
||||
Network struct {
|
||||
Name string
|
||||
}
|
||||
|
||||
Server struct {
|
||||
PassConfig
|
||||
Name string
|
||||
Database string
|
||||
Listen []string
|
||||
Wslisten string
|
||||
Log string
|
||||
MOTD string
|
||||
Name string
|
||||
}
|
||||
|
||||
Operator map[string]*PassConfig
|
||||
|
|
@ -67,6 +71,9 @@ func LoadConfig(filename string) (config *Config, err error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if config.Network.Name == "" {
|
||||
return nil, errors.New("Network name missing")
|
||||
}
|
||||
if config.Server.Name == "" {
|
||||
return nil, errors.New("Server name missing")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue