使用https://github.com/andygrunwald/go-jira时:
问题 - 解决日期定义为
struct {
...
Resolutiondate Time `json:"resolutiondate,omitempty" structs:"resolutiondate,omitempty"`
...
}
和
type Time time.Time
尝试访问使用 github.com/spf13/cast
var resDate time.Time
resDate, err = cast.ToTimeE(issue.Fields.Resolutiondate)
我得到:
err = "unable to cast jira.Time{wall:0x0, ext:63694019156, loc:(*time.Location)(0xe10a80)} of type jira.Time to Time"
或者在尝试施放时,我遇到施放违规
resDate = issue.Fields.Resolutiondate.(time.Time)
(试图将 Resolutiondate 的类型更改为 time.Time,但得到一个 html 响应转换错误...)
翻过高山走不出你
慕田峪4524236
随时随地看视频慕课网APP
相关分类