Skip to content
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

Merged
merged 5 commits into from
Oct 7, 2020

Conversation

orsinium
Copy link
Contributor

@orsinium orsinium commented Oct 5, 2020

I've run golangci-lint on cfg package and it found some violations. Mostly, it comes from go-lint and about ignored variables and unchecked errors.

The PR fixes all the violations.

@@ -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")
Copy link
Owner

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?

Copy link
Contributor Author

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

@@ -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)
Copy link
Owner

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! Fixed.

@orsinium
Copy link
Contributor Author

orsinium commented Oct 6, 2020

Review comments are applied 👍

@muesli muesli merged commit 173471d into muesli:master Oct 7, 2020
@muesli
Copy link
Owner

muesli commented Oct 7, 2020

Thank you @orsinium, loving all the PRs!

@orsinium orsinium deleted the cfg-go-lint branch October 7, 2020 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants