From 0770c76d0110261d1f678ab9364b212d91a1220f Mon Sep 17 00:00:00 2001 From: Kailash Nadh Date: Thu, 19 Jan 2023 11:24:05 +0530 Subject: [PATCH] Document `Set(key, val)` in README. --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c615bb4e..6489e5dd 100644 --- a/README.md +++ b/README.md @@ -697,8 +697,9 @@ func main() { | `Cut(path string) *Koanf` | Cuts the loaded nested conf map at the given path and returns a new Koanf instance with the children | | `Copy() *Koanf` | Returns a copy of the Koanf instance | | `Merge(*Koanf)` | Merges the config map of a Koanf instance into the current instance | -| `Delete(path string)` | Delete the value at the given path, and does nothing if path doesn't exist. | | `MergeAt(in *Koanf, path string)` | Merges the config map of a Koanf instance into the current instance, at the given key path. | +| `Set(path string, val interface{})` | Shorthand wrapper around `Merge()` for directly overriding the value of a given key path. | +| `Delete(path string)` | Delete the value at the given path, and does nothing if path doesn't exist. | | `Unmarshal(path string, o interface{}) error` | Scans the given nested key path into a given struct (like json.Unmarshal) where fields are denoted by the `koanf` tag | | `UnmarshalWithConf(path string, o interface{}, c UnmarshalConf) error` | Like Unmarshal but with customizable options |