aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Eccles <[email protected]>2019-04-05 08:26:24 -0400
committerWill Eccles <[email protected]>2019-04-05 08:26:24 -0400
commitbbe87a0b9e019c95e7c385ede99db862a7dad541 (patch)
treea297b5cc0b58f85212d376d46e3c72f5028c8e11
parentkitty input is now sorted (diff)
downloadschemer2-bbe87a0b9e019c95e7c385ede99db862a7dad541.tar.xz
schemer2-bbe87a0b9e019c95e7c385ede99db862a7dad541.zip
strings.fieldsfunc -> strings.fields
-rw-r--r--input.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/input.go b/input.go
index 11490af..2cc9466 100644
--- a/input.go
+++ b/input.go
@@ -292,7 +292,7 @@ func inputKittyTerm(filename string) ([]color.Color, error) {
colors := make([]color.Color, 0)
for _, l := range colorlines {
// Assuming the color to be the rightmost half of the last instance of space/tab
- splits := strings.FieldsFunc(l, KittySplit)
+ splits := strings.Fields(l)
colorstring := splits[len(splits)-1]
col, err := parseColor(colorstring)
if err != nil {
@@ -303,7 +303,3 @@ func inputKittyTerm(filename string) ([]color.Color, error) {
return colors, nil
}
-
-func KittySplit(r rune) bool {
- return r == ' ' || r == '\t'
-}