From ff0285a4ca9dd867ecab0080578b1e1db46eb11b Mon Sep 17 00:00:00 2001 From: Jason Song Date: Tue, 12 May 2020 17:16:20 +0800 Subject: [PATCH] fix: remove useless statement --- README.md | 1 - internal/gtag/template.go | 1 - internal/gtag/template_test.go | 1 - test/internal/regular/empty_tag.go | 1 - test/internal/regular/user_tag.go | 2 -- test/internal/tutorial/user_tag.go | 1 - 6 files changed, 7 deletions(-) diff --git a/README.md b/README.md index 165d45d..934f523 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,6 @@ func (User) Tags(tag string, convert ...func(string) string) UserTags { if conv == nil { conv = func(in string) string { return in } } - _ = conv return UserTags{ Id: conv(tagOfUserId.Get(tag)), Name: conv(tagOfUserName.Get(tag)), diff --git a/internal/gtag/template.go b/internal/gtag/template.go index 3ddfcac..847ca27 100644 --- a/internal/gtag/template.go +++ b/internal/gtag/template.go @@ -70,7 +70,6 @@ func ({{$type}}) Tags(tag string, convert ...func(string) string) {{$type}}Tags if conv == nil { conv = func(in string) string { return in } } - _ = conv return {{$type}}Tags{ {{- range .Fields}} {{.Name}}: conv(tagOf{{$type}}{{.Name}}.Get(tag)), diff --git a/internal/gtag/template_test.go b/internal/gtag/template_test.go index d04f07a..8145b94 100644 --- a/internal/gtag/template_test.go +++ b/internal/gtag/template_test.go @@ -91,7 +91,6 @@ func (test) Tags(tag string, convert ...func(string) string) testTags { if conv == nil { conv = func(in string) string { return in } } - _ = conv return testTags{ A: conv(tagOftestA.Get(tag)), b: conv(tagOftestb.Get(tag)), diff --git a/test/internal/regular/empty_tag.go b/test/internal/regular/empty_tag.go index 65d6440..b484625 100644 --- a/test/internal/regular/empty_tag.go +++ b/test/internal/regular/empty_tag.go @@ -27,7 +27,6 @@ func (Empty) Tags(tag string, convert ...func(string) string) EmptyTags { if conv == nil { conv = func(in string) string { return in } } - _ = conv return EmptyTags{} } diff --git a/test/internal/regular/user_tag.go b/test/internal/regular/user_tag.go index a0d6953..9908cbb 100644 --- a/test/internal/regular/user_tag.go +++ b/test/internal/regular/user_tag.go @@ -47,7 +47,6 @@ func (User) Tags(tag string, convert ...func(string) string) UserTags { if conv == nil { conv = func(in string) string { return in } } - _ = conv return UserTags{ Id: conv(tagOfUserId.Get(tag)), Name: conv(tagOfUserName.Get(tag)), @@ -94,7 +93,6 @@ func (UserName) Tags(tag string, convert ...func(string) string) UserNameTags { if conv == nil { conv = func(in string) string { return in } } - _ = conv return UserNameTags{ First: conv(tagOfUserNameFirst.Get(tag)), Last: conv(tagOfUserNameLast.Get(tag)), diff --git a/test/internal/tutorial/user_tag.go b/test/internal/tutorial/user_tag.go index 98a3af8..42d0165 100644 --- a/test/internal/tutorial/user_tag.go +++ b/test/internal/tutorial/user_tag.go @@ -42,7 +42,6 @@ func (User) Tags(tag string, convert ...func(string) string) UserTags { if conv == nil { conv = func(in string) string { return in } } - _ = conv return UserTags{ Id: conv(tagOfUserId.Get(tag)), Name: conv(tagOfUserName.Get(tag)),