conf.go 386 B

12345678910111213141516171819202122232425262728
  1. package conf
  2. import (
  3. "github.com/widuu/goini"
  4. )
  5. var conf = &goini.Config{}
  6. func init() {
  7. conf = goini.SetConfig("./conf/conf.ini")
  8. // 微信
  9. }
  10. func GetConf() *goini.Config {
  11. return conf
  12. }
  13. func GetP1() string {
  14. return conf.GetValue("ordonnance", "p1")
  15. }
  16. func GetPort() string {
  17. return conf.GetValue("ordonnance", "port")
  18. }
  19. func GetPidName() string {
  20. return "ordonnance"
  21. }