-
-
Notifications
You must be signed in to change notification settings - Fork 68
/
target.go
32 lines (29 loc) · 849 Bytes
/
target.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
package result
import "fmt"
// Target holds target execution result
type Target struct {
// Name holds the target name
Name string
/*
Result holds the target result, accepted values must be one:
* "SUCCESS"
* "FAILURE"
* "ATTENTION"
* "SKIPPED"
*/
Result string
// OldInformation stores the old information detected by the target execution
OldInformation string
// NewInformation stores the new information updated by during the target execution
NewInformation string
// Description stores the target execution description
Description string
// Files holds the list of files modified by a target execution
Files []string
Changed bool
}
func (t *Target) String() string {
str := fmt.Sprintf("%q => %q", t.OldInformation, t.NewInformation)
str = str + fmt.Sprintf("\n%s - %s", t.Result, t.Description)
return str
}