|
|
@@ -11,16 +11,16 @@ type Bug struct {
|
|
|
Title string // The title of the bug in human readable format
|
|
|
Description Field // The description of the bug
|
|
|
Status Field // The status of the bug
|
|
|
- Tags VariadicField // A slice of [buggo.Tag] structs
|
|
|
- Blockedby VariadicField // A slice of [buggo.Blocker] structs
|
|
|
+ Tags VariadicField // A slice of VariadicFields
|
|
|
+ Blockedby VariadicField // A slice of VariadicFields
|
|
|
Path string // The path to the bug
|
|
|
machineTitle string // The machine parseable bug title
|
|
|
}
|
|
|
|
|
|
// A struct representing data that is tied to data on disk
|
|
|
type Field struct {
|
|
|
- path string
|
|
|
- data string
|
|
|
+ Path string
|
|
|
+ Data string
|
|
|
}
|
|
|
|
|
|
// VariadicFields hold lists of Field objects.
|
|
|
@@ -47,17 +47,17 @@ func (b Bug) View() string {
|
|
|
|
|
|
var tags string
|
|
|
for _, tag := range b.Tags.Fields {
|
|
|
- tags = tags + string(tag.data) + ", "
|
|
|
+ tags = tags + string(tag.Data) + ", "
|
|
|
}
|
|
|
|
|
|
var blockers string
|
|
|
for _, blocker := range b.Blockedby.Fields {
|
|
|
- blockers = blockers + string(blocker.data) + ", "
|
|
|
+ blockers = blockers + string(blocker.Data) + ", "
|
|
|
}
|
|
|
|
|
|
return fmt.Sprintf("%s\n\n%s\n---\nTags:\t%s\nBlockedby:\t%s\n---\n%s",
|
|
|
headerStyle.Render(b.Title),
|
|
|
- subtitleStyle.Render("status:\t"+b.Status.data),
|
|
|
+ subtitleStyle.Render("status:\t"+b.Status.Data),
|
|
|
tagsStyle.Render(tags),
|
|
|
tagsStyle.Render(blockers),
|
|
|
b.Description,
|