From 009a6e397651a9540b6c6bb74ef2230eeda9b577 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sun, 17 Aug 2025 03:09:52 +0800 Subject: Some mass renaming --- forged/internal/common/misc/slices.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 forged/internal/common/misc/slices.go (limited to 'forged/internal/common/misc/slices.go') diff --git a/forged/internal/common/misc/slices.go b/forged/internal/common/misc/slices.go new file mode 100644 index 0000000..3ad0211 --- /dev/null +++ b/forged/internal/common/misc/slices.go @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: AGPL-3.0-only +// SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu + +package misc + +import "strings" + +// 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 +} -- cgit v1.2.3