-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: replace manual types with generated types and cut a v1 module
Signed-off-by: Ben Meier <[email protected]>
- Loading branch information
1 parent
992082d
commit b6ae672
Showing
13 changed files
with
776 additions
and
561 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,12 @@ | ||
# score-go | ||
Reference library for the parsing and loading SCORE files | ||
|
||
Reference library for the parsing and loading SCORE files in Go. | ||
|
||
This can be added to your project via: | ||
|
||
```sh | ||
$ go get -u github.com/score-spec/score-go/v1 | ||
``` | ||
|
||
## Parsing SCORE files | ||
|
||
|
@@ -10,8 +17,8 @@ import ( | |
"io" | ||
"os" | ||
|
||
"github.com/score-spec/score-go/loader" | ||
score "github.com/score-spec/score-go/types" | ||
"github.com/score-spec/score-go/v1/loader" | ||
score "github.com/score-spec/score-go/v1/types" | ||
) | ||
|
||
func main() { | ||
|
@@ -40,3 +47,25 @@ func main() { | |
} | ||
|
||
``` | ||
|
||
## Upgrading the schema version | ||
|
||
When the Score JSON schema is updated in https://github.com/score-spec/schema, this repo should be updated to match. | ||
|
||
First update the subtree: | ||
|
||
``` | ||
git subtree pull --prefix schema/files [email protected]:score-spec/schema.git main --squash | ||
``` | ||
|
||
Then regenerate the defined types: | ||
|
||
``` | ||
go generate -v ./... | ||
``` | ||
|
||
And ensure the tests still pass: | ||
|
||
``` | ||
go test -v ./... | ||
``` |
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
Oops, something went wrong.