-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: remove redundant parallelisation
- Loading branch information
Showing
7 changed files
with
190 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package runner | ||
|
||
type status int8 | ||
|
||
const ( | ||
success status = iota | ||
failure | ||
skip | ||
) | ||
|
||
// Result contains name of a command/script and an optional fail string. | ||
type Result struct { | ||
Name string | ||
status status | ||
text string | ||
} | ||
|
||
func (r Result) Success() bool { | ||
return r.status == success | ||
} | ||
|
||
func (r Result) Failure() bool { | ||
return r.status == failure | ||
} | ||
|
||
func (r Result) Text() string { | ||
return r.text | ||
} | ||
|
||
func skipped(name string) Result { | ||
return Result{Name: name, status: skip} | ||
} | ||
|
||
func succeeded(name string) Result { | ||
return Result{Name: name, status: success} | ||
} | ||
|
||
func failed(name, text string) Result { | ||
return Result{Name: name, status: failure, text: text} | ||
} |
Oops, something went wrong.