doc: add a note about concurent Get/Set to godoc

This commit is contained in:
Chris Waldon 2021-04-13 09:12:40 -04:00 committed by Márk Sági-Kazár
parent cb41ae0ab8
commit 727a41c38a
1 changed files with 2 additions and 0 deletions

View File

@ -176,6 +176,8 @@ func DecodeHook(hook mapstructure.DecodeHookFunc) DecoderConfigOption {
// "user": "root", // "user": "root",
// "endpoint": "https://localhost" // "endpoint": "https://localhost"
// } // }
//
// Note: Vipers are not safe for concurrent Get() and Set() operations.
type Viper struct { type Viper struct {
// Delimiter that separates a list of keys // Delimiter that separates a list of keys
// used to access a nested value in one go // used to access a nested value in one go