Skip to content

Instantly share code, notes, and snippets.

@mainawycliffe
Last active November 6, 2022 22:09
Show Gist options
  • Save mainawycliffe/816757d2e333087d6d89111e09c49964 to your computer and use it in GitHub Desktop.
Save mainawycliffe/816757d2e333087d6d89111e09c49964 to your computer and use it in GitHub Desktop.
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