diff options
Diffstat (limited to 'misc/misc.go')
-rw-r--r-- | misc/misc.go | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/misc/misc.go b/misc/misc.go deleted file mode 100644 index ee0fd7a..0000000 --- a/misc/misc.go +++ /dev/null @@ -1,21 +0,0 @@ -package misc - -import "strings" - -func FirstOrPanic[T any](v T, err error) T { - if err != nil { - panic(err) - } - return v -} - -// sliceContainsNewlines returns true if and only if the given slice contains -// one or more strings that contains newlines. -func SliceContainsNewlines(s []string) bool { - for _, v := range s { - if strings.Contains(v, "\n") { - return true - } - } - return false -} |