item_entity.go

 1package board
 2
 3import (
 4	"github.com/git-bug/git-bug/entities/bug"
 5	"github.com/git-bug/git-bug/entity"
 6)
 7
 8var _ Item = &BugItem{}
 9
10type BugItem struct {
11	combinedId entity.CombinedId
12	Bug        bug.Interface
13}
14
15func (e *BugItem) CombinedId() entity.CombinedId {
16	if e.combinedId == "" || e.combinedId == entity.UnsetCombinedId {
17		// simply panic as it would be a coding error (no id provided at construction)
18		panic("no combined id")
19	}
20	return e.combinedId
21}