Skip to content

Viper update#2

Merged
sjohnson-cloudian merged 136 commits intomasterfrom
viper-update
Apr 23, 2025
Merged

Viper update#2
sjohnson-cloudian merged 136 commits intomasterfrom
viper-update

Conversation

@sjohnson-cloudian
Copy link
Collaborator

No description provided.

mexisme and others added 30 commits June 11, 2019 16:47
* Support `.env` format files

* Missing "dotenv" from SupportedExtns
* Add support for int slice flags

* Add int slice test to unmarshal
The indentation seemed messed up and didn't read well. This change fixes it.
* ADD: installation method

* Update README.md
Unmarshal -> viper.Unmarshal
Signed-off-by: lucperkins <lucperkins@gmail.com>
Signed-off-by: CodeLingo Bot <bot@codelingo.io>
Defering can cause trouble because we're writing to the file outside the function
where the defering is registered, calling f.Sync() ensures that bytes are flushed
to disk even is Close() is called too soon.
If the config file does not exist and the force flag is not set,
OpenFile would not use O_CREATE flag, causing viper to fail with
error "File not exist" and to not create the config file.
This patch changes the behavior of writeConfig() so that if force is set
to false, OpenFile will use O_EXCL flag, thus failing if the file
already exists or creating a new file otherwise.

Signed-off-by: Rodrigo Chiossi <rodrigo.chiossi@intel.com>
Just a nitpicky typo fix.
Added error handling around ineffectual err assignments. Please review
thoroughly.
Removed unnecessary conversions.
Changed formatting of test objects for better git diffing and readibility.
Fixed failing tests on Windows.
sagikazarmark and others added 26 commits October 1, 2020 22:37
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
* Added support for accessing slices

* Processed PR feedback
- renamed searchMapWithPathPrefixes to searchIndexableWithPathPrefixes
- moved source type specific search logic to speparate functions
- Inverted if statments to avoid the arrow pattern

* Quickly return from searchSliceWithPathPrefixes and searchMapWithPathPrefixes functions without intermediate variables
Fixes spf13#1000

Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
* Update afero version

* Ran go mod tidy
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
@sjohnson-cloudian sjohnson-cloudian merged commit a574903 into master Apr 23, 2025
0 of 6 checks passed
@sjohnson-cloudian sjohnson-cloudian deleted the viper-update branch April 23, 2025 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.