Created
June 21, 2019 11:13
-
-
Save chris001177/651c5d783cff873f975f3c43835d892a 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
package config | |
import ( | |
"github.com/myproject/definition" | |
"time" | |
) | |
// Since the definition package must not contain any logic, | |
// managing configuration is implemented in a config package. | |
func InitPermissions() { | |
definition.RolePermissions = definition.ConfigDBInstance.AllPermissions() | |
go func() { | |
for { | |
time.Sleep(time.Hour) | |
definition.RolePermissions = definition.ConfigDBInstance.AllPermissions() | |
} | |
}() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment