aboutsummaryrefslogtreecommitdiff
path: root/lib/strings
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-04-05 23:09:46 +0700
committerShulhan <ms@kilabit.info>2023-04-05 23:09:46 +0700
commite5e55fcd9f98714e2f765a0cc8e52de02dd5ab7a (patch)
tree48c633526d4b45afef927ebc57708b738d0dd5ab /lib/strings
parent98a256e57f2df1b10b7cd75808bee68d8abd1dcd (diff)
downloadpakakeh.go-e5e55fcd9f98714e2f765a0cc8e52de02dd5ab7a.tar.xz
lib/strings: fix warnings from linter revive
Diffstat (limited to 'lib/strings')
-rw-r--r--lib/strings/string_example_test.go2
-rw-r--r--lib/strings/to_example_test.go16
2 files changed, 9 insertions, 9 deletions
diff --git a/lib/strings/string_example_test.go b/lib/strings/string_example_test.go
index 2cf2b889..f83be421 100644
--- a/lib/strings/string_example_test.go
+++ b/lib/strings/string_example_test.go
@@ -64,7 +64,7 @@ func ExampleMergeSpaces() {
}
func ExampleSplit() {
- var line string = `a b c [A] B C`
+ var line = `a b c [A] B C`
fmt.Println(Split(line, false, false))
fmt.Println(Split(line, true, false))
fmt.Println(Split(line, false, true))
diff --git a/lib/strings/to_example_test.go b/lib/strings/to_example_test.go
index 096548fd..59dc8db7 100644
--- a/lib/strings/to_example_test.go
+++ b/lib/strings/to_example_test.go
@@ -10,8 +10,8 @@ import (
func ExampleToBytes() {
var (
- ss = []string{`This`, `is`, `a`, `string`}
- sbytes [][]byte = ToBytes(ss)
+ ss = []string{`This`, `is`, `a`, `string`}
+ sbytes = ToBytes(ss)
)
fmt.Printf(`%s`, sbytes)
@@ -20,8 +20,8 @@ func ExampleToBytes() {
func ExampleToFloat64() {
var (
- in = []string{`0`, `1.1`, `e`, `3`}
- sf64 []float64 = ToFloat64(in)
+ in = []string{`0`, `1.1`, `e`, `3`}
+ sf64 = ToFloat64(in)
)
fmt.Println(sf64)
@@ -30,8 +30,8 @@ func ExampleToFloat64() {
func ExampleToInt64() {
var (
- in = []string{`0`, `1`, `e`, `3.3`}
- si64 []int64 = ToInt64(in)
+ in = []string{`0`, `1`, `e`, `3.3`}
+ si64 = ToInt64(in)
)
fmt.Println(si64)
@@ -40,8 +40,8 @@ func ExampleToInt64() {
func ExampleToStrings() {
var (
- i64 = []interface{}{0, 1.99, 2, 3}
- ss []string = ToStrings(i64)
+ i64 = []interface{}{0, 1.99, 2, 3}
+ ss = ToStrings(i64)
)
fmt.Println(ss)