summaryrefslogtreecommitdiffstats
path: root/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'helpers')
-rw-r--r--helpers/general.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/helpers/general.go b/helpers/general.go
index 3d4396440..da05548f4 100644
--- a/helpers/general.go
+++ b/helpers/general.go
@@ -465,3 +465,9 @@ func DiffStringSlices(slice1 []string, slice2 []string) []string {
return diffStr
}
+
+// DiffString splits the strings into fields and runs it into DiffStringSlices.
+// Useful for tests.
+func DiffStrings(s1, s2 string) []string {
+ return DiffStringSlices(strings.Fields(s1), strings.Fields(s2))
+}