reflections for unmarshal

This commit is contained in:
Christian Goll
2022-08-05 12:33:58 +02:00
parent d819eef792
commit 41d12888ab
8 changed files with 320 additions and 277 deletions

View File

@@ -72,6 +72,9 @@ func CobraRunE(cmd *cobra.Command, args []string) (err error) {
fieldName = "tag:" + subkeys[1]
case "IpmiEntry":
fieldName = ipmiLopt[subkeys[1]]
if len(subkeys) == 3 {
fieldName = "ipmikey:" + subkeys[2]
}
case "KernelEntry":
fieldName = kernelLopt[subkeys[1]]
case "NetDevEntry":