You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
koanf is not a file-first library. The file provider is the same as any other provider (bytes, network etc.). It wouldn't be ideal to have file creation functions in the core, and simply creating a non-existent file provides marginal utility.
This should definitely be handled externally. Using the file provider, it should be as simple as something like:
if err := errors.Is(err, os.ErrNotExist) {
// your business logic to create one or more files, populate them with default contents etc.
}
missing
create
feature leads developers write external code. why not just add this feature.The text was updated successfully, but these errors were encountered: