fix for go1.16 and possible sigsev
This commit is contained in:
@@ -29,6 +29,7 @@ func ConfirmationPrompt(label string) (yes bool) {
|
||||
Simple check if the config can be written in case wwctl isn't run as root
|
||||
*/
|
||||
func CanWriteConfig() (canwrite *wwapiv1.CanWriteConfig) {
|
||||
canwrite = new(wwapiv1.CanWriteConfig)
|
||||
err := syscall.Access(node.ConfigFile, syscall.O_RDWR)
|
||||
if err != nil {
|
||||
wwlog.Warn("Couldn't open %s:%s", node.ConfigFile, err)
|
||||
|
||||
@@ -512,7 +512,7 @@ func getYamlString(myType reflect.StructField, excludeList []string) (string, bo
|
||||
ymlStr += ": {string}"
|
||||
} else if myType.Type == reflect.TypeOf(map[string]string{}) {
|
||||
ymlStr += ": {key: value}"
|
||||
} else if myType.Type.Kind() == reflect.Pointer {
|
||||
} else if myType.Type.Kind() == reflect.Ptr {
|
||||
ymlStr += ":"
|
||||
}
|
||||
return ymlStr, true
|
||||
|
||||
Reference in New Issue
Block a user