MCPcopy Create free account
hub / github.com/GoTestTools/gotestfmt / MarshalJSON

Method MarshalJSON

parser/model_json.go:59–70  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57}
58
59func (p *Package) MarshalJSON() ([]byte, error) {
60 tmp := tmpPackage{
61 Name: p.Name,
62 Result: p.Result,
63 Duration: p.Duration.String(),
64 Coverage: p.Coverage,
65 Output: p.Output,
66 TestCases: p.TestCases,
67 Reason: p.Reason,
68 }
69 return json.Marshal(tmp)
70}
71
72func (p *Package) UnmarshalJSON(data []byte) error {
73 var tmp tmpPackage

Callers

nothing calls this directly

Calls 1

StringMethod · 0.80

Tested by

no test coverage detected