common.go 435 B

12345678910111213141516171819
  1. package qconf
  2. import (
  3. "git.shuncheng.lu/bigthing/gocommon/pkg/conf"
  4. "git.shuncheng.lu/bigthing/gocommon/pkg/internal/util"
  5. )
  6. func GetQconfIdc() string {
  7. return conf.GetString("qconf", "qconfIdc", "")
  8. }
  9. func InitQconf() error {
  10. if conf.GetEnv() == conf.EnvDebug {
  11. util.Warnf("[Qconf] not init, current env=debug")
  12. return nil
  13. }
  14. util.Debugf("[Qconf] load config success , qconfIdc: %s", GetQconfIdc())
  15. return initQconf()
  16. }