-
-
Notifications
You must be signed in to change notification settings - Fork 324
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 go-lint violations in cfg
package
#338
Conversation
cfg/config_test.go
Outdated
@@ -9,15 +9,17 @@ import ( | |||
func TestNew(t *testing.T) { | |||
conf, err := New("/foobar") | |||
if err != nil { | |||
panic(err) | |||
t.Error("cannot create config from path") |
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.
Couldn't we just use t.Fatal
here?
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.
Thank you! I'm a bit lost without assertify 🙃 Fixed
cfg/config_test.go
Outdated
@@ -26,24 +28,28 @@ func TestNew(t *testing.T) { | |||
cwd, _ := os.Getwd() | |||
p := filepath.Join(cwd, "testdata/beehive-crypto.conf") | |||
conf, err = New(p) | |||
if err != nil { | |||
panic(err) |
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.
I think you just forgot that one.
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.
Great catch! Fixed.
Review comments are applied 👍 |
Thank you @orsinium, loving all the PRs! |
I've run
golangci-lint
oncfg
package and it found some violations. Mostly, it comes fromgo-lint
and about ignored variables and unchecked errors.The PR fixes all the violations.