-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.go
39 lines (33 loc) · 833 Bytes
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package main
type Config struct {
Tags []Tag `json:"tags"`
Ignore []string `json:"ignore,omitempty"`
}
type Tag struct {
Name string `json:"name"`
Match []string `json:"match"`
}
type ParsedTask struct {
ID string `json:"id"`
File string `json:"file"`
Line int `json:"line"`
Tag string `json:"tag"`
Text string `json:"text"`
Context []string `json:"context"` // assuming context is a slice of lines
}
type DiffResult struct {
ID string `json:"id"`
Tag string `json:"tag"`
Type string `json:"type"`
Data DiffData `json:"data"`
}
type DiffData struct {
Old *DiffInfo `json:"old"`
New *DiffInfo `json:"new"`
}
type DiffInfo struct {
Text string `json:"text"`
Line int `json:"line"`
File string `json:"file"`
Context []string `json:"context"`
}