Skip to content

Commit

Permalink
config: fix revive linter error
Browse files Browse the repository at this point in the history
  Error: superfluous-else: if block ends with call to os.Exit function, so drop this else and outdent its block (revive)

Signed-off-by: Roman Khimov <roman@nspcc.ru>
  • Loading branch information
roman-khimov committed May 12, 2023
1 parent bd9cfeb commit e6983d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ image:

gh-docker-vars:
@echo "file=Dockerfile"
@echo "version=$(VERSION)"
@echo "repo=$(HUB_REPO)"
@echo "version=$(HUB_TAG)"
@echo "repo=$(HUB_IMAGE)"

# Run tests
test:
Expand Down
7 changes: 3 additions & 4 deletions cmd/neofs-oauthz/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,9 @@ func newConfig() *viper.Viper {
if !v.IsSet(cmdConfig) {
fmt.Println("config path is mandatory")
os.Exit(1)
} else {
if err := readConfig(v); err != nil {
panic(err)
}
}
if err := readConfig(v); err != nil {
panic(err)
}

return v
Expand Down

0 comments on commit e6983d9

Please sign in to comment.