Commit graph

4 commits

Author SHA1 Message Date
Oleksandr Redko c4dcd31f68 fix: godot lint issues 2023-11-30 21:20:53 +07:00
Oleksandr Redko a0696bbc97 docs: fix typos in comments 2023-09-07 13:32:51 +02:00
CodeLingo Bot 275a36d0a0 Fix function comments based on best practices from Effective Go
Signed-off-by: CodeLingo Bot <bot@codelingo.io>
2019-07-13 12:11:16 +02:00
David Calavera 66249a6550 Add FlagValue interface to support other flag systems.
Using an interface allows people to use their favourite flag system
with viper without being restricted to the semantics of pflag or the
standard library.

This change introduce two new functions `BindFlagValues` and
`BindFlagValue` that behave like `BindFlags` and `BindFlag` but using
the new interface as values.

This change also introduces two internal structures to transform
`*pflag.FlagSet` and `*pflag.Flag` into the new interface. This way,
viper keeps working as expected for people that are currently using the
pflag package without breaking backwards compatibility.

Signed-off-by: David Calavera <david.calavera@gmail.com>
2015-12-24 10:16:41 -05:00