mycommon/myconf/conf_test.go

26 lines
294 B
Go
Raw Normal View History

2023-01-15 00:21:08 +08:00
package myconf
import (
"fmt"
"testing"
)
func TestConf(t *testing.T) {
type Config struct {
App struct {
Name string
Addr string
Port int
}
Redis struct {
Addr string
Db int
}
}
var config = &Config{}
Init("test.yaml", config)
fmt.Printf("%+v\n", config)
}