Commit 9583ceb

mo khan <mo@mokhan.ca>
2024-06-05 23:17:59
Add yaml tags to issue struct
1 parent 5779ea0
Changed files (1)
pkg
gitlab
pkg/gitlab/issue.go
@@ -15,17 +15,17 @@ const (
 )
 
 type Issue struct {
-	ID          int        `json:"id"`
-	IID         int        `json:"iid"`
-	ProjectID   int        `json:"project_id"`
-	Title       string     `json:"title"`
-	Description string     `json:"description"`
-	State       IssueState `json:"state"`
-	CreatedAt   time.Time  `json:"created_at"`
-	UpdatedAt   time.Time  `json:"updated_at"`
-	ClosedAt    time.Time  `json:"closed_at"`
-	ClosedBy    User       `json:"closed_by"`
-	Labels      []string   `json:"labels"`
+	ID          int        `json:"id" yaml:"id"`
+	IID         int        `json:"iid" yaml:"iid"`
+	ProjectID   int        `json:"project_id" yaml:"project_id"`
+	Title       string     `json:"title" yaml:"title"`
+	Description string     `json:"description" yaml:"description"`
+	State       IssueState `json:"state" yaml:"state"`
+	CreatedAt   time.Time  `json:"created_at" yaml:"created_at"`
+	UpdatedAt   time.Time  `json:"updated_at" yaml:"updated_at"`
+	ClosedAt    time.Time  `json:"closed_at" yaml:"closed_at"`
+	ClosedBy    User       `json:"closed_by" yaml:"closed_by"`
+	Labels      []string   `json:"labels" yaml:"labels"`
 }
 
 func (issue *Issue) ToParam() string {