conf_test.go 500 B

123456789101112131415161718192021
  1. package conf
  2. import (
  3. "fmt"
  4. l4g "github.com/alecthomas/log4go"
  5. "testing"
  6. )
  7. func TestGetInfo(t *testing.T) {
  8. log := &l4g.Logger{}
  9. defer log.Close()
  10. LoadConfig(log)
  11. fmt.Println("name: ", GetInfo().Database.Dbname)
  12. fmt.Println("host: ", GetInfo().Database.Host)
  13. fmt.Println("user: ", GetInfo().Database.User)
  14. fmt.Println("pwd: ", GetInfo().Database.Pwd)
  15. fmt.Println("template: ", GetInfo().Report.Template)
  16. fmt.Println("out: ", GetInfo().Report.Out)
  17. }