Skip to content

Commit

Permalink
Skip lint check for unused file config.go
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-bangera committed Oct 15, 2024
1 parent c673483 commit bf8309c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions cmd/migrate/config.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//nolint:unused
package main

import "github.com/spf13/pflag"
Expand Down
5 changes: 4 additions & 1 deletion cmd/migrate/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ import (

func init() {
pflag.Parse()
viper.BindPFlags(pflag.CommandLine)
err := viper.BindPFlags(pflag.CommandLine)
if err != nil {
log.Fatalf("failed to bind full flag set to config: %v", err)
}
viper.AutomaticEnv()
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
viper.AddConfigPath(viper.GetString("config.source"))
Expand Down

0 comments on commit bf8309c

Please sign in to comment.