Skip to content

Commit 6ee6942

Browse files
committed
Fatal instead of panic to make lint happy
1 parent e3039fd commit 6ee6942

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sumologic/resource_sumologic_monitors_library_monitor.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package sumologic
22

33
import (
4-
"fmt"
54
"log"
65
"strings"
76

@@ -1226,7 +1225,7 @@ func fromSingletonArray(block map[string]interface{}, field string) (map[string]
12261225
case 1:
12271226
return arr[0], true
12281227
default:
1229-
panic(fmt.Sprintf("Expected field '%s' to be a singleton array if present, got: %s", field, iface))
1228+
log.Fatalf("Expected field '%s' to be a singleton array if present, got: %s", field, iface)
12301229
}
12311230
case []interface{}:
12321231
switch len(arr) {
@@ -1235,10 +1234,10 @@ func fromSingletonArray(block map[string]interface{}, field string) (map[string]
12351234
case 1:
12361235
return arr[0].(map[string]interface{}), true
12371236
default:
1238-
panic(fmt.Sprintf("Expected field '%s' to be a singleton array if present, got: %s", field, iface))
1237+
log.Fatalf("Expected field '%s' to be a singleton array if present, got: %s", field, iface)
12391238
}
12401239
default:
1241-
panic(fmt.Sprintf("Expected field '%s' to be a singleton array if present, got: %s", field, iface))
1240+
log.Fatalf("Expected field '%s' to be a singleton array if present, got: %s", field, iface)
12421241
}
12431242
}
12441243
return emptyDict, false

0 commit comments

Comments
 (0)