File tree Expand file tree Collapse file tree 3 files changed +45
-7
lines changed Expand file tree Collapse file tree 3 files changed +45
-7
lines changed Original file line number Diff line number Diff line change 1+ version : 2
2+ updates :
3+ # Maintain dependencies for GitHub Actions
4+ # src: https://github.com/marketplace/actions/build-and-push-docker-images#keep-up-to-date-with-github-dependabot
5+ - package-ecosystem : " github-actions"
6+ directory : " /"
7+ schedule :
8+ interval : " daily"
Original file line number Diff line number Diff line change 1+ on :
2+ push :
3+ branches :
4+ - master
5+ pull_request :
6+
7+ name : CI
8+
9+ jobs :
10+ test :
11+ name : run tests
12+ runs-on : ubuntu-22.04
13+ steps :
14+ - uses : actions/checkout@v4
15+ - uses : actions/setup-go@v5
16+ with :
17+ go-version : ' ^1.13.0'
18+ - name : Run tests
19+ run : go test
20+
21+ fmt :
22+ name : check code formatting with gofmt
23+ runs-on : ubuntu-22.04
24+ steps :
25+ - uses : actions/checkout@v4
26+ - uses : actions/setup-go@v5
27+ with :
28+ go-version : ' ^1.13.0'
29+ - name : run gofmt
30+ run : diff -u <(echo -n) <(gofmt -d ./)
Original file line number Diff line number Diff line change @@ -26,22 +26,22 @@ type ResultError struct {
2626
2727// VersionValidationResult validation result per version
2828type VersionValidationResult struct {
29- Version string `json:"version"`
30- Valid bool `json:"valid"`
31- Errors []ResultError `json:"errors"`
29+ Version string `json:"version"`
30+ Valid bool `json:"valid"`
31+ Errors []ResultError `json:"errors"`
3232}
3333
3434// ValidationResult tells you if the provided string is a valid SpaceApi schema
3535// and if not tells you what needs to be fixed
3636type ValidationResult struct {
37- Valid bool `json:"valid"`
38- Schemas []VersionValidationResult `json:"version_validation"`
39- Errors []ResultError `json:"errors"`
37+ Valid bool `json:"valid"`
38+ Schemas []VersionValidationResult `json:"version_validation"`
39+ Errors []ResultError `json:"errors"`
4040}
4141
4242// Validate a string to match jsonschema of SpaceApi
4343func Validate (document string ) (ValidationResult , error ) {
44- myResult := ValidationResult { Valid : true }
44+ myResult := ValidationResult {Valid : true }
4545 if document == "" {
4646 return myResult , errors .New ("document is empty" )
4747 }
You can’t perform that action at this time.
0 commit comments