Refactor logLines to SplitByNewline, deduplicate

This commit is contained in:
Benjamin A. Petersen
2024-03-19 16:48:06 -04:00
parent 5c1fa6d52c
commit 0467e5c1d5
7 changed files with 24 additions and 39 deletions
-14
View File
@@ -1,14 +0,0 @@
// Copyright 2024 the Pinniped contributors. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
package testlogger
import "strings"
func LogLines(logs string) []string {
if len(logs) == 0 {
return nil
}
return strings.Split(strings.TrimSpace(logs), "\n")
}