Last active
November 6, 2022 22:09
-
-
Save mainawycliffe/816757d2e333087d6d89111e09c49964 to your computer and use it in GitHub Desktop.
This file contains 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
go func(){ | |
for { | |
time.Sleep(time.Second * 5) // delay after each request for 5 seconds | |
// read config from source | |
// update viper | |
viper.ReadConfig(bytes.NewBuffer(jsonData)) | |
} | |
}() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment