We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.67.0
ini.Key.Time() 方法能将时间数据按 RFC3339 解析,但直接将整个配置数据注入 Golang 结构体,却不按此行为解析。
func ParseTime() { var cfg struct { Time time.Time `ini:"time"` } err := ini.MapTo(&cfg, []byte(`time=2025-01-04T16:25:00+08:00"`)) if err != nil { panic(err) } fmt.Println(cfg.Time) fmt.Println(time.Parse(time.RFC3339, "2025-01-04T16:25:00+08:00")) }
能将时间数据按 RFC3339 格式注入结构体字段中。
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version
1.67.0
Describe the bug
ini.Key.Time() 方法能将时间数据按 RFC3339 解析,但直接将整个配置数据注入 Golang 结构体,却不按此行为解析。
To reproduce
Expected behavior
能将时间数据按 RFC3339 格式注入结构体字段中。
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: