From d73be125f87d9519d05f013e9f743d869c8e7893 Mon Sep 17 00:00:00 2001 From: Ma_124 Date: Fri, 19 Apr 2019 09:01:53 +0200 Subject: [PATCH] ran gofmt -s -w *.go --- camel_test.go | 26 ++++++++--------- snake_test.go | 78 +++++++++++++++++++++++++-------------------------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/camel_test.go b/camel_test.go index b62b9c4..92e397b 100644 --- a/camel_test.go +++ b/camel_test.go @@ -30,15 +30,15 @@ import ( func TestToCamel(t *testing.T) { cases := [][]string{ - []string{"test_case", "TestCase"}, - []string{"test", "Test"}, - []string{"TestCase", "TestCase"}, - []string{" test case ", "TestCase"}, - []string{"", ""}, - []string{"many_many_words", "ManyManyWords"}, - []string{"AnyKind of_string", "AnyKindOfString"}, - []string{"odd-fix", "OddFix"}, - []string{"numbers2And55with000", "Numbers2And55With000"}, + {"test_case", "TestCase"}, + {"test", "Test"}, + {"TestCase", "TestCase"}, + {" test case ", "TestCase"}, + {"", ""}, + {"many_many_words", "ManyManyWords"}, + {"AnyKind of_string", "AnyKindOfString"}, + {"odd-fix", "OddFix"}, + {"numbers2And55with000", "Numbers2And55With000"}, } for _, i := range cases { in := i[0] @@ -52,10 +52,10 @@ func TestToCamel(t *testing.T) { func TestToLowerCamel(t *testing.T) { cases := [][]string{ - []string{"foo-bar", "fooBar"}, - []string{"TestCase", "testCase"}, - []string{"", ""}, - []string{"AnyKind of_string", "anyKindOfString"}, + {"foo-bar", "fooBar"}, + {"TestCase", "testCase"}, + {"", ""}, + {"AnyKind of_string", "anyKindOfString"}, } for _, i := range cases { in := i[0] diff --git a/snake_test.go b/snake_test.go index 9c0f9d2..37ca332 100644 --- a/snake_test.go +++ b/snake_test.go @@ -31,23 +31,23 @@ import ( func TestToSnake(t *testing.T) { cases := [][]string{ - []string{"testCase", "test_case"}, - []string{"TestCase", "test_case"}, - []string{"Test Case", "test_case"}, - []string{" Test Case", "test_case"}, - []string{"Test Case ", "test_case"}, - []string{" Test Case ", "test_case"}, - []string{"test", "test"}, - []string{"test_case", "test_case"}, - []string{"Test", "test"}, - []string{"", ""}, - []string{"ManyManyWords", "many_many_words"}, - []string{"manyManyWords", "many_many_words"}, - []string{"AnyKind of_string", "any_kind_of_string"}, - []string{"numbers2and55with000", "numbers_2_and_55_with_000"}, - []string{"JSONData", "json_data"}, - []string{"userID", "user_id"}, - []string{"AAAbbb", "aa_abbb"}, + {"testCase", "test_case"}, + {"TestCase", "test_case"}, + {"Test Case", "test_case"}, + {" Test Case", "test_case"}, + {"Test Case ", "test_case"}, + {" Test Case ", "test_case"}, + {"test", "test"}, + {"test_case", "test_case"}, + {"Test", "test"}, + {"", ""}, + {"ManyManyWords", "many_many_words"}, + {"manyManyWords", "many_many_words"}, + {"AnyKind of_string", "any_kind_of_string"}, + {"numbers2and55with000", "numbers_2_and_55_with_000"}, + {"JSONData", "json_data"}, + {"userID", "user_id"}, + {"AAAbbb", "aa_abbb"}, } for _, i := range cases { in := i[0] @@ -61,24 +61,24 @@ func TestToSnake(t *testing.T) { func TestToDelimited(t *testing.T) { cases := [][]string{ - []string{"testCase", "test@case"}, - []string{"TestCase", "test@case"}, - []string{"Test Case", "test@case"}, - []string{" Test Case", "test@case"}, - []string{"Test Case ", "test@case"}, - []string{" Test Case ", "test@case"}, - []string{"test", "test"}, - []string{"test_case", "test@case"}, - []string{"Test", "test"}, - []string{"", ""}, - []string{"ManyManyWords", "many@many@words"}, - []string{"manyManyWords", "many@many@words"}, - []string{"AnyKind of_string", "any@kind@of@string"}, - []string{"numbers2and55with000", "numbers@2@and@55@with@000"}, - []string{"JSONData", "json@data"}, - []string{"userID", "user@id"}, - []string{"AAAbbb", "aa@abbb"}, - []string{"test-case", "test@case"}, + {"testCase", "test@case"}, + {"TestCase", "test@case"}, + {"Test Case", "test@case"}, + {" Test Case", "test@case"}, + {"Test Case ", "test@case"}, + {" Test Case ", "test@case"}, + {"test", "test"}, + {"test_case", "test@case"}, + {"Test", "test"}, + {"", ""}, + {"ManyManyWords", "many@many@words"}, + {"manyManyWords", "many@many@words"}, + {"AnyKind of_string", "any@kind@of@string"}, + {"numbers2and55with000", "numbers@2@and@55@with@000"}, + {"JSONData", "json@data"}, + {"userID", "user@id"}, + {"AAAbbb", "aa@abbb"}, + {"test-case", "test@case"}, } for _, i := range cases { in := i[0] @@ -92,7 +92,7 @@ func TestToDelimited(t *testing.T) { func TestToScreamingSnake(t *testing.T) { cases := [][]string{ - []string{"testCase", "TEST_CASE"}, + {"testCase", "TEST_CASE"}, } for _, i := range cases { in := i[0] @@ -106,7 +106,7 @@ func TestToScreamingSnake(t *testing.T) { func TestToKebab(t *testing.T) { cases := [][]string{ - []string{"testCase", "test-case"}, + {"testCase", "test-case"}, } for _, i := range cases { in := i[0] @@ -120,7 +120,7 @@ func TestToKebab(t *testing.T) { func TestToScreamingKebab(t *testing.T) { cases := [][]string{ - []string{"testCase", "TEST-CASE"}, + {"testCase", "TEST-CASE"}, } for _, i := range cases { in := i[0] @@ -134,7 +134,7 @@ func TestToScreamingKebab(t *testing.T) { func TestToScreamingDelimited(t *testing.T) { cases := [][]string{ - []string{"testCase", "TEST.CASE"}, + {"testCase", "TEST.CASE"}, } for _, i := range cases { in := i[0]