Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't support camel, or _ - split style field name in yml file #62

Open
yufenghui opened this issue Nov 23, 2020 · 1 comment
Open

Comments

@yufenghui
Copy link

yufenghui commented Nov 23, 2020

server:
  id: 1
  name: ''

db:
  driverName: mysql
  url: ''
  demoDb: ''
  dataDb: ''
var Config = struct {
	Server struct {
		Id   int    `required:"true"`
		Name string `required:"true"`
	}

	DB struct {
		DriverName string `required:"true"`
		Url      string `required:"true"`
		DemoDb  string `required:"true"`
		DataDb      string `required:"true"`
	}
}
@w1ndyz
Copy link

w1ndyz commented Aug 5, 2021

今天遇到了这个问题,发现使用 yaml:""的tag就能正常解析。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants