Various nodeDB updates

This commit is contained in:
Gregory Kurtzer
2020-11-27 16:39:27 -08:00
parent e3dd3253d1
commit f74826bc87
4 changed files with 72 additions and 29 deletions

View File

@@ -1,21 +1,27 @@
package node
import "strings"
import (
"strings"
)
func (self *NodeInfoEntry) String() string {
return self.Get()
}
func (self *NodeInfoEntry) Source() string {
if self.value != "" {
return "node=" + self.value
return "node"
}
if self.group != "" {
return "group=" + self.group
return "group"
}
if self.profile != "" {
return "profile=" + self.profile
return "profile"
}
if self.def != "" {
return "default=" + self.def
return "default"
}
return "--"
return ""
}
func (self *NodeInfoEntry) Get() string {