Merged
Conversation
* 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.
Signed-off-by: Mark Sagi-Kazar <mark.sagikazar@gmail.com>
This reverts commit 0a45372.
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>
gbunt
approved these changes
Apr 23, 2025
scartmell-cloudian
approved these changes
Apr 23, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.