Commit Graph

561 Commits

Author SHA1 Message Date
Vasily Ovchinnikov e606f7496e fix: made `InConfig` process paths correctly 2021-09-16 10:32:19 +02:00
Márk Sági-Kazár 2062cd6ee6
Fix codeql workflow 2021-09-15 21:19:19 +02:00
Mark Sagi-Kazar c4687f7766 Add CodeQL analysis workflow
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-09-15 21:08:35 +02:00
Mark Sagi-Kazar 5a4d2a0519 chore(deps): update crypt library fork
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-09-15 21:08:07 +02:00
Mark Sagi-Kazar 6937864bf6 chore(deps): update go-ini dependency
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-09-15 18:49:09 +02:00
dependabot[bot] e897cbf546 build(deps): bump github.com/pelletier/go-toml from 1.9.3 to 1.9.4
Bumps [github.com/pelletier/go-toml](https://github.com/pelletier/go-toml) from 1.9.3 to 1.9.4.
- [Release notes](https://github.com/pelletier/go-toml/releases)
- [Commits](https://github.com/pelletier/go-toml/compare/v1.9.3...v1.9.4)

---
updated-dependencies:
- dependency-name: github.com/pelletier/go-toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-15 18:09:44 +02:00
连修明 eb876e1a15 update readme.md
```go
viper.WatchConfig()
viper.OnConfigChange(func(e fsnotify.Event) {
	fmt.Println("Config file changed:", e.Name)
})
```
this code will cause data race,  please check this question:
https://stackoverflow.com/questions/68915944/viper-dynamically-loading-config-file-has-data-race/68919971#68919971
2021-09-04 19:33:59 +02:00
dependabot[bot] 38e00eefc4 Bump github.com/fsnotify/fsnotify from 1.4.9 to 1.5.1
Bumps [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify) from 1.4.9 to 1.5.1.
- [Release notes](https://github.com/fsnotify/fsnotify/releases)
- [Changelog](https://github.com/fsnotify/fsnotify/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fsnotify/fsnotify/compare/v1.4.9...v1.5.1)

---
updated-dependencies:
- dependency-name: github.com/fsnotify/fsnotify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-04 19:28:57 +02:00
Mark Sagi-Kazar 5c0d079c4e ci: run builds on Go 1.17
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-08-24 23:23:02 +02:00
dependabot[bot] cf6565fd72 Bump github.com/spf13/cast from 1.4.0 to 1.4.1
Bumps [github.com/spf13/cast](https://github.com/spf13/cast) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/spf13/cast/releases)
- [Commits](https://github.com/spf13/cast/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: github.com/spf13/cast
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-17 01:41:55 +02:00
Márk Sági-Kazár a7cfd8b8e0
Fix bug report template 2021-07-30 03:38:09 +02:00
Márk Sági-Kazár 294bb31a4b
Add Go version to bug report tempplate 2021-07-30 03:37:33 +02:00
dependabot[bot] f2053fabba Bump github.com/spf13/cast from 1.3.1 to 1.4.0
Bumps [github.com/spf13/cast](https://github.com/spf13/cast) from 1.3.1 to 1.4.0.
- [Release notes](https://github.com/spf13/cast/releases)
- [Commits](https://github.com/spf13/cast/compare/v1.3.1...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cast
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-28 03:20:43 +02:00
Mark Sagi-Kazar ab4b05adc6 chore: add GitHub issue forms
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-07-14 04:02:54 +02:00
Márk Sági-Kazár e866eaa591 Update feedback_pull_request.yml 2021-07-12 19:53:25 +02:00
Márk Sági-Kazár bc5df54485 Update feedback_issue.yml 2021-07-12 19:53:25 +02:00
dependabot[bot] 409a7ba1d6 Bump actions/github-script from 3 to 4.0.2
Bumps [actions/github-script](https://github.com/actions/github-script) from 3 to 4.0.2.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v3...v4.0.2)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-12 19:53:25 +02:00
Márk Sági-Kazár 489df740ac Update dependabot.yml 2021-07-12 19:44:20 +02:00
Matthieu MOREL 899b682f8c Create dependabot.yml 2021-07-12 19:44:20 +02:00
Mark Sagi-Kazar 030b739e60
docs: add section about decoding formats
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-06-25 14:49:58 +02:00
Mark Sagi-Kazar a02f9864fa feat(encoding): Integrate the new encoding package into Viper
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-06-25 14:26:08 +02:00
Mark Sagi-Kazar 699d749768 feat(encoding): Add toml codec
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-06-25 14:26:08 +02:00
Mark Sagi-Kazar 6f15444771 feat(encoding): Add hcl codec
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-06-25 14:26:08 +02:00
Mark Sagi-Kazar 186266359b feat(encoding): Add json codec
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-06-25 14:26:08 +02:00
Mark Sagi-Kazar 0e854bf27b feat(encoding): Add yaml codec 2021-06-25 14:26:08 +02:00
Mark Sagi-Kazar a00caae79f feat(encoding): Encoder/Decoder registry implementations 2021-06-25 14:26:08 +02:00
Mikhail f. Shiryaev bd03865899 Add a proper processing for pflag.StringArray 2021-06-25 13:55:36 +02:00
lmx-Hexagram 3fcad43618 update %s to %w
I apologize for my rude pr on modify readme
I think it is better to use %w in fmt.Errorf instead of %s
(see go doc)[https://golang.org/pkg/errors/]
2021-06-17 19:17:07 +02:00
Mark Sagi-Kazar faa8ba0c53 chore: update gotestsum
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-06-16 03:06:32 +02:00
Mark Sagi-Kazar 65ee98690c chore(lint): fix gofumpt
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-06-16 03:06:32 +02:00
Mark Sagi-Kazar 04ef5fa07d chore: update golangci-lint
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-06-16 03:06:32 +02:00
Carlos Henrique Guardão Gandarez acd965b54e Add ini load options argument
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-06-16 01:55:16 +02:00
Mark Sagi-Kazar 5f4d053c3e chore(deps): update dependencies
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-06-16 01:47:15 +02:00
Mark Sagi-Kazar dd57ae6279 chore(deps): update etcd
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-06-16 01:47:15 +02:00
Carolyn Van Slyck cdb5e5976f Fix merging a key into a nil target
When merging a key where the target value is nil, the type of the target
and source do not match. What currently happens is an error is logged
and the key is skipped.

I have changed it so that it does the same thing as when the target key
is missing: copy the source value to the target.

Signed-off-by: Carolyn Van Slyck <me@carolynvanslyck.com>
2021-05-17 08:55:31 +02:00
Mark Sagi-Kazar 36be6bf91f feat: make sure Viper compiles on WASM
fsnotify is not available on WASM,
so config watching is not going to work.

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-04-24 10:24:23 +02:00
Chris Waldon 727a41c38a doc: add a note about concurent Get/Set to godoc 2021-04-15 18:20:20 +02:00
Chris Waldon cb41ae0ab8 doc: discuss concurrency in README 2021-04-15 18:20:20 +02:00
Mark Sagi-Kazar 7fdb267c73 chore: update dependencies
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-04-15 18:12:07 +02:00
Mark Sagi-Kazar 52536944d5 ci: add Go 1.16 to build matrix
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-03-15 09:30:15 +01:00
r-stepanenko fb4eafdd97
fix INI saving panics (#1075) 2021-03-10 14:46:19 +01:00
bridgetbarnes 3c7b44f0bc
Update afero version (CVE-2020-14040) (#1090)
* Update afero version

* Ran go mod tidy
2021-03-10 14:45:23 +01:00
Mark Sagi-Kazar 4613c4a95f docs: move troubleshooting to a new document
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-02-15 07:47:45 +01:00
Mark Sagi-Kazar a86148e76e docs: add note about go modules to the readme
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-02-15 07:47:45 +01:00
Mark Sagi-Kazar e66f940bcc docs: add troubleshooting guide about package not being found
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-02-15 07:47:45 +01:00
Mark Sagi-Kazar d10c856f6c Add discussions to issue links
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-01-11 03:55:13 +01:00
Márk Sági-Kazár da70fee083
Add troubleshooting about unmarshaling 2020-12-17 22:13:27 +01:00
Mark Sagi-Kazar 99da8b22a1
Add labels to issue templates
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2020-12-11 17:36:00 +01:00
Mark Sagi-Kazar 811f0e6937
Add issue and PR templates
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2020-12-11 17:33:03 +01:00
Mark Sagi-Kazar bba82cfc61 docs: add run on repl.it badge with example
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2020-12-03 01:43:52 +01:00