This is a significant change in the undelying data model! nodeDb, err := node.New() will result in a structure which contains the on disk values. Only nodeDb.FindAllNodes() or nodeDb.GetNode(id) will give the nodes with its merged in profiles. Signed-off-by: Christian Goll <cgoll@suse.com>
17 lines
230 B
Go
17 lines
230 B
Go
package node
|
|
|
|
/*
|
|
helper functions
|
|
*/
|
|
|
|
// string which is printed if no value is set
|
|
const NoValue = "--"
|
|
|
|
// print NoValue if string is empty
|
|
func PrintVal(in string) (out string) {
|
|
if in != "" {
|
|
return in
|
|
}
|
|
return NoValue
|
|
}
|