Support result formatting
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
This commit is contained in:
parent
8ae5fa912b
commit
ca943e1dc8
8 changed files with 456 additions and 225 deletions
31
internal/s3/structure.go
Normal file
31
internal/s3/structure.go
Normal file
|
@ -0,0 +1,31 @@
|
|||
package s3
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
//go:embed resources/tests-struct.json
|
||||
var testStructData []byte
|
||||
|
||||
type TestsStructure struct {
|
||||
Groups []Group `json:"groups"`
|
||||
}
|
||||
|
||||
type Group struct {
|
||||
Name string `json:"name"`
|
||||
Tag string `json:"tag"`
|
||||
Skip bool `json:"skip"`
|
||||
Comment string `json:"comment"`
|
||||
Tests []string `json:"tests"`
|
||||
}
|
||||
|
||||
func ParseTestsStruct() (TestsStructure, error) {
|
||||
var testStruct TestsStructure
|
||||
if err := json.Unmarshal(testStructData, &testStruct); err != nil {
|
||||
return TestsStructure{}, fmt.Errorf("failed to parse tests struct: %w", err)
|
||||
}
|
||||
|
||||
return testStruct, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue