Remove dead code

Verified with

```
deadcode -test ./...
```

Followed-up with a lint check.

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-10-18 09:30:52 -06:00
parent 1780736905
commit b331fd12af
15 changed files with 0 additions and 938 deletions

View File

@@ -1,16 +0,0 @@
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
}

View File

@@ -82,40 +82,6 @@ func FilterProfileListByName(set []ProfileConf, searchList []string) []ProfileCo
return ret
}
/*
Filter a given map of NodeConf against given regular expression.
*/
func FilterNodeMapByName(inputMap map[string]*NodeConf, searchList []string) (retMap map[string]*NodeConf) {
retMap = map[string]*NodeConf{}
if len(searchList) > 0 {
for _, search := range searchList {
for name, nConf := range inputMap {
if match, _ := regexp.MatchString("^"+search+"$", name); match {
retMap[name] = nConf
}
}
}
}
return retMap
}
/*
Filter a given map of ProfileConf against given regular expression.
*/
func FilterProfileMapByName(inputMap map[string]*ProfileConf, searchList []string) (retMap map[string]*ProfileConf) {
retMap = map[string]*ProfileConf{}
if len(searchList) > 0 {
for _, search := range searchList {
for name, nConf := range inputMap {
if match, _ := regexp.MatchString("^"+search+"$", name); match {
retMap[name] = nConf
}
}
}
}
return retMap
}
/*
Creates an NodeConf with the given id. Doesn't add it to the database
*/