added empty check
This commit is contained in:
parent
20ac152a2b
commit
7f405ea6e5
1 changed files with 3 additions and 0 deletions
|
|
@ -78,6 +78,9 @@ func (n Nameserver) String() string {
|
|||
type serverConfig map[string]interface{}
|
||||
|
||||
func (sc serverConfig) Server(node, id string) (s *Server, err error) {
|
||||
if len(sc) == 0 {
|
||||
return
|
||||
}
|
||||
s = &Server{ID: id, Node: node}
|
||||
|
||||
for k := range sc {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue