Skip to content

Commit

Permalink
JSON and YAML struct tags for Status and Error types
Browse files Browse the repository at this point in the history
JSON and YAML struct tags for Status and Error types
  • Loading branch information
gaborszakacs authored and joshdk committed Feb 16, 2019
1 parent a64a94f commit 389b262
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,14 @@ type Test struct {

// Status is the result of the test. Status values are passed, skipped,
// failure, & error.
Status Status
Status Status `json:"status" yaml:"status"`

// Error is a record of the failure or error of a test, if applicable.
//
// The following relations should hold true.
// Error == nil && (Status == Passed || Status == Skipped)
// Error != nil && (Status == Failed || Status == Error)
Error error
Error error `json:"error" yaml:"error"`
}

// Error represents an erroneous test result.
Expand Down

0 comments on commit 389b262

Please sign in to comment.