conf.go 379 B

1234567891011121314151617181920212223
  1. package cnf
  2. /**
  3. DEPRECATED:
  4. Read config file from dist. use viper which support many types of configure files.
  5. */
  6. //import (
  7. // "github.com/spf13/viper"
  8. //)
  9. //
  10. //func Load(file string) error {
  11. // v := viper.New();
  12. // v.AddConfigPath(".")
  13. // v.SetConfigType("json")
  14. // v.SetConfigFile(file)
  15. // err := v.ReadInConfig()
  16. // if err != nil {
  17. // return err
  18. // }
  19. // return nil
  20. //}