Commit graph

266 commits

Author SHA1 Message Date
Cody Lee
bf41424e1c
add back go.sum 2020-02-27 10:38:11 -06:00
MRHwick
940e2f6b82 move travis diff call to before vendoring 2020-02-27 11:28:17 -05:00
Matthew Hardwick
8a855103ac
try excluding vendor from gofmt 2020-02-27 11:18:38 -05:00
Matthew Hardwick
7d500a2af3
bump patch for etcd
https://github.com/etcd-io/etcd/issues/11475
2020-02-27 10:51:42 -05:00
Matthew Hardwick
2922e4434f
Try fixing go.mod problem from ugorji/go/codec
https://github.com/ugorji/go/issues/299
https://github.com/ugorji/go/issues/318
https://github.com/ugorji/go/pull/319
2020-02-27 10:30:37 -05:00
Matthew Hardwick
31f45ebfd6
try build with -mod=readonly for test command 2020-02-27 09:59:02 -05:00
Cody Lee
146f689044
start the script by vendoring first 2020-02-26 17:07:36 -06:00
Cody Lee
713af2cac4
hacks from other travis users 2020-02-26 17:01:06 -06:00
Cody Lee
cfa0e76c89
define custom install to make go modules work 2020-02-26 16:56:56 -06:00
Cody Lee
6163a31d56
Merge pull request #12 from DataDog/go-mod-fix
Go modules fix
2020-02-26 16:45:49 -06:00
Cody Lee
69031d4075
bump to 1.14 2020-02-26 16:44:40 -06:00
Cody Lee
a4cbd30fbd
fix travis.yml so build actually works 2020-02-26 16:36:08 -06:00
Cody Lee
5b85211713
fix go.mod module definition to use the correct path
run `go mod tidy`
2020-02-26 16:23:04 -06:00
Albert Vaca
0d6ea091c7
Merge pull request #7 from DataDog/albertvaka/poc-config-schema
Enable storing a set of known valid config keys
2019-04-23 17:53:20 +02:00
Albert Vaca
e528ca4ad4
Merge pull request #8 from DataDog/albertvaka/tests-avoid-globals
Make tests independent from each other
2019-04-23 15:25:53 +02:00
Albert Vaca
e98778d4ec Make tests independent from each other
By creating a new Viper for each test instead of using the global one
2019-04-23 13:24:20 +02:00
Albert Vaca
e8b3270767 Added test for known keys 2019-04-23 12:40:40 +02:00
Albert Vaca
ead7a65a23 Added missing global versions of SetKnown/GetKnown
For consistency
2019-04-23 12:40:19 +02:00
Albert Vaca
73fad7c9db Enable storing a set of known valid config keys
This can be used to enforce a config schema
2019-03-29 19:08:07 +01:00
Albert Vaca
991b92b30e
Merge pull request #5 from DataDog/albertvaka/warn-duplicate-keys-no-rebased
Warn when a yaml file has duplicated keys
2019-03-29 18:05:23 +01:00
Albert Vaca
42a499d7ac Warn when a yaml file has duplicated keys
Try using `UnmarshalStrict`, if it fails, print the errors as a warning and try again with plain `Unmarshal`.

Errors look this way:
```
2019/03/26 15:11:33 warning reading config file: yaml: unmarshal errors:
  line 6: key "api_key" already set in map
```
2019-03-29 15:13:52 +01:00
Albert Vaca
10edc96e10
Merge pull request #6 from spf13/master
Merge changes from original repo
2019-03-29 15:12:04 +01:00
Bjørn Erik Pedersen
9e56dacc08 Remove superflous insensitiviseMaps in Unmarshal methods
Fixes #482
2019-03-13 10:29:51 +01:00
Xavier Lucas
59d5cbf4d7
Allow using error getters without disabling type inference (#4) 2019-03-05 13:27:36 +01:00
Xavier Lucas
eadb687b05
Merge pull request #3 from DataDog/xavier.lucas/get-with-errors
Expose type casting errors
2019-03-01 16:47:21 +01:00
Xavier Lucas
07a0f11324
Expose type casting errors 2019-02-26 15:07:04 +01:00
Olivier Vielpeau
23ced3bc6b
Merge pull request #2 from olivielpeau/allow-keydelim-mapkey
Fix AllSettings when some map keys contain the key delimiter
2019-02-14 18:26:07 +01:00
Olivier Vielpeau
e89dd07ee4 Fix AllSettings when some map keys contain the key delimiter 2019-02-14 14:08:51 +01:00
maxime mouial
e9c8d7a439
Merge pull request #1 from DataDog/maxime/merge-override
Adding a method to merge config in the override section
2019-02-13 10:36:55 -07:00
Maxime Mouial
e8d119fbb0 Adding a method to merge config in the override section
This allows users to set configuration that would have precedence on env
variable. This is very useful when some post-processing is done on the
configuration.
2019-02-12 14:20:58 -07:00
Mark Sagi-Kazar
d104d259b3 Update go.sum with go1.11.4
In Go 1.11.4 a bug was fixed related to checksum calculation.
As a result, some packages might end up with a different checksum
from this version. The solution is upgrading, cleaning the mod cache
and recalculating the go.sum file.

See https://github.com/golang/go/issues/27093
2019-01-27 10:44:59 +01:00
Bjørn Erik Pedersen
6d33b5a963
Make the map in MergeConfigMap case insensitive 2018-12-07 11:03:36 +01:00
Bjørn Erik Pedersen
41cd1c3aa3 Restrict Travis to >= Go 1.11, use Go Modules, and get the test to pass 2018-12-05 17:13:47 +01:00
Bjørn Erik Pedersen
3535c75fa8 Add MergeConfigMap
Fixes #605
2018-12-05 17:13:47 +01:00
Bjørn Erik Pedersen
06c7c0d9b3
Use assert.EqualValues for slice checking 2018-11-19 10:38:40 +01:00
Benoit Masson
ae103d7e59 Moved shared resources out of the loops in TestBindPFlagsStringSlice()
Common code and resources put out of the loops, to improve
efficiency and readability.
2018-11-07 12:08:59 +01:00
Benoit Masson
69647fb422 Fixed TestBindPFlagsStringSlice()
Replaced Visit() by VisitAll(), so that the Changed attribute of
the updated flag is correctly set.
2018-11-07 12:08:59 +01:00
Benoit Masson
cc7e906d88 Updated TestBindPFlagsStringSlice() to highlight a failure
When pflag marked as changed, the value is not detected
(and lower priority value used)
2018-11-07 12:08:59 +01:00
Márk Sági-Kazár
b7a3b95476 Lookup environment variables instead of checking if the value is empty
This commit adds an `AllowEmptyEnv` option that, default off, that when set will allow set, but empty, environment variables

Fixes #317
2018-11-06 22:53:21 +01:00
Andrew Stuart
62edee3196
Revert "Cater for case-sensitive dependencies (#463)"
This reverts commit b56071875a.
2018-09-29 21:41:27 -07:00
Panagiotis Moustafellos
b56071875a Cater for case-sensitive dependencies (#463)
Switching jww from jwalterweatherman to jWalterWeatherman for cases when vgo is broken
2018-09-29 20:32:38 -07:00
Andrew Stuart
8e194e8ad2
Merge branch 'master' into mergefix/Issue284_Kubernetes_config 2018-09-28 01:05:04 -07:00
Andrew Stuart
0d783e7344
Use test log 2018-09-28 01:04:19 -07:00
Andrew Stuart
2c12c60302
Fix nil pointer on watch function (#568) 2018-09-28 00:53:21 -07:00
Bjørn Erik Pedersen
3171ef9a22
Revert "Add go.sum to .gitignore"
This reverts commit 841bd4ebcd.
2018-09-07 15:06:02 +02:00
Bjørn Erik Pedersen
841bd4ebcd
Add go.sum to .gitignore
Seems that it's better practice to keep that in Git for "main modules".
2018-09-07 11:52:15 +02:00
Bjørn Erik Pedersen
8fb6420065
Add go.mod 2018-09-07 11:30:55 +02:00
Dr. Tobias Quathamer
0ac2068de9 Fix overflow error on 32 bit architectures (#340)
* Handle int64 separately for 32 bit architectures

* Remove tests which result in an overflow error on 32 bit architectures
2018-09-01 14:59:01 -06:00
Adhatama
8addaed22d Add README.md for Consul remote provider (#489) 2018-08-28 16:05:06 -06:00
Aarti Parikh
05116ad639 Revert "fix dep wrong case (#484)"
This reverts commit b7a62b2c00.
2018-08-28 02:34:36 -06:00