-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(linter): golangci-lint v1.61.0 compatibility #334
base: main
Are you sure you want to change the base?
Conversation
@@ -106,7 +106,7 @@ func (s *ListLayout) appendSection(title, note string, sectionBody []string) { | |||
if s.style.NoteSeparator { | |||
s.appendLine() | |||
} | |||
s.l.AppendItem(DefaultNoteColours.Sprintf(note)) | |||
s.l.AppendItem(DefaultNoteColours.Sprintf("%s", note)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there Sprint
method available? If yes, the extra string as string format could be omitted 🤔
s.l.AppendItem(DefaultNoteColours.Sprintf("%s", note)) | |
s.l.AppendItem(DefaultNoteColours.Sprint(note)) |
"testing" | ||
) | ||
|
||
func TestConcatStringsSingleString(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looping through input, expected tuples and doing assert in a sub-test would also work, as all tests have the same check, but no big difference.
func TestConcatStringsSingleString(t *testing.T) { | ||
result := ConcatStrings("hello") | ||
expected := "hello" | ||
if result != expected { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
assert.Equal
helper could be used in the validations.
No description provided.