为了账号安全,请及时绑定邮箱和手机立即绑定

无法访问/投射时间。时间

无法访问/投射时间。时间

Go
翻过高山走不出你 2022-06-06 14:46:00
使用https://github.com/andygrunwald/go-jira时:问题 - 解决日期定义为struct {  ...  Resolutiondate                Time              `json:"resolutiondate,omitempty" structs:"resolutiondate,omitempty"`  ...}和type Time time.Time尝试访问使用 github.com/spf13/castvar resDate time.TimeresDate, 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 响应转换错误...)
查看完整描述

1 回答

?
慕田峪4524236

TA贡献1875条经验 获得超5个赞

我非常确定我测试过: resDate=time.Time(issue.Fields.ResolutionDate) 感谢您的帮助



查看完整回答
反对 回复 2022-06-06
  • 1 回答
  • 0 关注
  • 107 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号