profile and node commands and DB all working as expected now

This commit is contained in:
Gregory Kurtzer
2020-12-03 13:49:49 -08:00
parent eaf6bb1196
commit 84bf9fbb43
14 changed files with 223 additions and 59 deletions

View File

@@ -1,6 +1,8 @@
package node
import "strings"
import (
"strings"
)
/**********
*
@@ -44,6 +46,16 @@ func (self *Entry) SetAltB(val bool, from string) {
return
}
func (self *Entry) SetDefault(val string) {
if val == "" {
return
}
self.def = val
return
}
/**********
*
* Gets
@@ -57,6 +69,9 @@ func (self *Entry) Get() string {
if self.altvalue != "" {
return self.altvalue
}
if self.def != "" {
return self.def
}
return ""
}
@@ -85,11 +100,17 @@ func (self *Entry) Print() string {
if self.altvalue != "" {
return self.altvalue
}
if self.def != "" {
return self.def
}
return "--"
}
func (self *Entry) Source() string {
if self.from == "" {
if self.value != "" && self.altvalue != "" {
return "OVERRIDDEN"
//return fmt.Sprintf("(%s)", self.from)
} else if self.from == "" {
return "--"
}
return self.from