1 回答
TA贡献1836条经验 获得超13个赞
声明所有结构的类型:
type JiraCreateStory struct {
Fields Fields
}
type Fields struct {
Project Project
Summary string
Issuetype Issuetype
UserStory string
Assignee Assignee
ProductOwner ProductOwner
}
type Project struct { Key string }
type Issuetype struct { Name string }
type Assignee struct { Name string }
type ProductOwner struct { Name string }
JiraCreateStory使用复合文字创建一个:
x := JiraCreateStory{Fields: Fields{
Project: Project{Key: src.Project},
Summary: src.Summary,
Issuetype: Issuetype{Name: src.Issuetype},
UserStory: src.UserStory,
Assignee: Assignee{Name: src.Assignee},
ProductOwner: ProductOwner{Name: src.ProductOwner},
}}
- 1 回答
- 0 关注
- 81 浏览
添加回答
举报