This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
package conf
|
||||
|
||||
import "testing"
|
||||
|
||||
type Server struct {
|
||||
Host string `yaml:"Host" default:"localhost"`
|
||||
Port int `yaml:"Port" default:"8080"`
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
Server Server `yaml:"Server"`
|
||||
}
|
||||
|
||||
func TestConfigLoad(t *testing.T) {
|
||||
var c Config
|
||||
MustLoad("./config_test.yaml", &c)
|
||||
t.Logf("config: %+v", c)
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
Server:
|
||||
Port: 9999
|
||||
Host: 0.0.0.0
|
||||
Reference in New Issue
Block a user