Commit graph

580 commits

Author SHA1 Message Date
Mark Sagi-Kazar
8b7777d3c6 test(windows): skip failing tests on windows
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-09-22 11:17:33 +02:00
Mark Sagi-Kazar
15c88da25c test(windows): fix watch file test
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-09-22 11:17:33 +02:00
Mark Sagi-Kazar
552e3bd0ca ci: separate lint and test
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-09-22 11:17:33 +02:00
Mark Sagi-Kazar
1a7008fa32 ci: make build pass on windows
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-09-22 11:17:33 +02:00
Mark Sagi-Kazar
077ee305c4 ci: run tests on windows
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-09-22 11:17:33 +02:00
Mark Sagi-Kazar
5a4e555471 test: add tests for reading config files
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-09-21 18:01:05 +02:00
Mark Sagi-Kazar
08ba8ca7fc ci: disable fail fast
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-09-21 18:01:05 +02:00
Mark Sagi-Kazar
4e595cec77 feat: use io/fs for searching files on Go 1.16+
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-09-21 18:01:05 +02:00
Mark Sagi-Kazar
557c5d64e0 test: improve tests for searching files
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-09-21 18:01:05 +02:00
Mark Sagi-Kazar
8e71595a4a feat: implement new finder using io/fs
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-09-21 18:01:05 +02:00
Mark Sagi-Kazar
ce82267a11 refactor: drop unused Unsetenv from testutil
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-09-21 11:27:27 +02:00
Mark Sagi-Kazar
558a299a01 feat: use TB.Setenv on Go 1.17
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-09-21 11:27:27 +02:00
Jim Razmus II
b1fdc47b0d Recognize tfvars files as hcl by default.
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-09-19 23:25:03 +02:00
Mark Sagi-Kazar
65f16c1738 docs: fix indentation in code samples
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
2021-09-19 22:10:43 +02:00
dependabot[bot]
0d7e8034ee build(deps): bump github.com/mitchellh/mapstructure from 1.4.1 to 1.4.2
Bumps [github.com/mitchellh/mapstructure](https://github.com/mitchellh/mapstructure) from 1.4.1 to 1.4.2.
- [Release notes](https://github.com/mitchellh/mapstructure/releases)
- [Changelog](https://github.com/mitchellh/mapstructure/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mitchellh/mapstructure/compare/v1.4.1...v1.4.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-19 09:30:36 +02:00
dependabot[bot]
6a29539e59 build(deps): bump gopkg.in/ini.v1 from 1.63.1 to 1.63.2
Bumps [gopkg.in/ini.v1](https://github.com/go-ini/ini) from 1.63.1 to 1.63.2.
- [Release notes](https://github.com/go-ini/ini/releases)
- [Commits](https://github.com/go-ini/ini/compare/v1.63.1...v1.63.2)

---
updated-dependencies:
- dependency-name: gopkg.in/ini.v1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-19 09:30:24 +02:00
Séra Zoltán
fa3412d7ea fix cannot write hidden file without extension (#1017) 2021-09-19 09:28:14 +02:00
Séra Zoltán
a1f26b11bd Add test for cannot write hidden file without extension 2021-09-19 09:28:14 +02:00
Séra Zoltán
46a61e6fbd Fixes #1062 2021-09-19 09:08:21 +02:00
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