diff --git a/cmd/add.go b/cmd/add.go index 4bcbe89..b1aea61 100644 --- a/cmd/add.go +++ b/cmd/add.go @@ -114,7 +114,6 @@ func addCmdF(cmd *cobra.Command, _ []string) { ErrorAndExit(cmd, err) } - // ToDo: make this skip duplicates cmp.Tickets = append(cmp.Tickets, tickets...) cmp.Tickets = model.RemoveDuplicateTickets(cmp.Tickets) diff --git a/model/ticket.go b/model/ticket.go index 24d155a..3aa0e7d 100644 --- a/model/ticket.go +++ b/model/ticket.go @@ -7,7 +7,7 @@ import ( type Ticket struct { Filename string `json:"filename"` LineNo int `json:"line_no"` - Text string `json:"text"` // needed?? + Text string `json:"text"` } func RemoveDuplicateTickets(tickets []*Ticket) []*Ticket {