knadh / koanf

Simple, extremely lightweight, extensible, configuration management library for Go. Support for JSON, TOML, YAML, env, command line, file, S3 etc. Alternative to viper.
MIT License
2.71k stars 150 forks source link

nomad provider #297

Open mkvolkov opened 4 months ago

mkvolkov commented 4 months ago

Added Nomad provider (remade).

Options:

knadh commented 3 months ago

Thanks for the PR. Could you please check the broken tests?

mkvolkov commented 3 months ago

My Go version is 1.22.3. Seems that Nomad api doesn't work with older versions

rhnvrm commented 3 months ago

Maybe, it might be possible to a build constraint. Eg. https://github.com/knadh/koanf/blob/e988f6600707ecee8b0cd4335c4e25975379c274/providers/nats/nats_test.go#L1-L2

Also: https://github.com/knadh/koanf/blob/master/go.work

knadh commented 2 months ago

@rhnvrm will removing ./examples from go.work fix this and other similar issues in the future? Is there any need to keep the examples dir in the workspace?

rhnvrm commented 2 months ago

I think just adding the build constraint should suffice. Removing examples from workspace will not fix the broken tests, I am guessing.