Skip to content

Commit

Permalink
Small tweak to add a conf folder as part of the default search path.
Browse files Browse the repository at this point in the history
  • Loading branch information
safaci2000 committed Apr 12, 2021
1 parent 26aba4f commit ede2f9f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ vendor
.history
grafana-dashboard-manager
importer.yml
dist/
32 changes: 32 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# This is an example .goreleaser.yml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ func readViperConfig(appName string) *viper.Viper {
v.SetEnvPrefix(appName)
v.SetConfigName(appName)
v.AddConfigPath(".")
//v.AddConfigPath("..")
v.AddConfigPath("conf")
v.AutomaticEnv()

// global defaults
Expand Down

0 comments on commit ede2f9f

Please sign in to comment.