diff --git a/.golangci.yaml b/.golangci.yaml index 23cc2db..d4ec8f0 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -59,7 +59,7 @@ linters: - empty - stdlib # PublicCode is the primary return type of the public API - - github.com/italia/publiccode-parser-go/v5.PublicCode + - github.com/publiccodeyml/libpubliccode/v5.PublicCode lll: line-length: 120 wrapcheck: diff --git a/.goreleaser.yml b/.goreleaser.yml index 086c149..fbbd013 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,6 +1,7 @@ # This is an example goreleaser.yaml file with some sane defaults. # Make sure to check the documentation at http://goreleaser.com version: 2 +project_name: publiccode-parser before: hooks: @@ -65,9 +66,11 @@ dockers: dockerfile: Dockerfile.goreleaser image_templates: - "italia/publiccode-parser-go:{{ .Tag }}-amd64" + - "publiccodeyml/publiccode-parser:{{ .Tag }}-amd64" build_flag_templates: - "--pull" - "--platform=linux/amd64" + - "--label=org.opencontainers.image.source=https://github.com/publiccodeyml/libpubliccode" - use: buildx goos: linux @@ -77,9 +80,11 @@ dockers: dockerfile: Dockerfile.goreleaser image_templates: - "italia/publiccode-parser-go:{{ .Tag }}-arm64" + - "publiccodeyml/publiccode-parser:{{ .Tag }}-arm64" build_flag_templates: - "--pull" - "--platform=linux/arm64" + - "--label=org.opencontainers.image.source=https://github.com/publiccodeyml/libpubliccode" docker_manifests: - name_template: "italia/publiccode-parser-go:latest" @@ -90,3 +95,11 @@ docker_manifests: image_templates: - "italia/publiccode-parser-go:{{ .Tag }}-amd64" - "italia/publiccode-parser-go:{{ .Tag }}-arm64" + - name_template: "publiccodeyml/publiccode-parser:latest" + image_templates: + - "publiccodeyml/publiccode-parser:{{ .Tag }}-amd64" + - "publiccodeyml/publiccode-parser:{{ .Tag }}-arm64" + - name_template: "publiccodeyml/publiccode-parser:{{ .Tag }}" + image_templates: + - "publiccodeyml/publiccode-parser:{{ .Tag }}-amd64" + - "publiccodeyml/publiccode-parser:{{ .Tag }}-arm64" diff --git a/CHANGELOG.md b/CHANGELOG.md index 70fd824..ed7f75b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ # Changelog -See the [releases page](https://github.com/italia/publiccode-parser-go/releases) for the full changelog. +See the [releases page](https://github.com/publiccodeyml/libpubliccode/releases) for the full changelog. diff --git a/README.md b/README.md index aabe06f..f3052fa 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ publiccode, err := parser.Parse("/path/to/local/dir/publiccode.yml") // parse.Parse("https://github.com/example/example/publiccode.yml") ``` -[![Go Reference](https://pkg.go.dev/badge/github.com/italia/publiccode-parser-go/v5.svg)](https://pkg.go.dev/github.com/italia/publiccode-parser-go/v5) +[![Go Reference](https://pkg.go.dev/badge/github.com/publiccodeyml/libpubliccode/v5.svg)](https://pkg.go.dev/github.com/publiccodeyml/libpubliccode/v5) ## From command line @@ -43,10 +43,10 @@ from the command line. To get the latest version use: ```shell -go install github.com/italia/publiccode-parser-go/v5/publiccode-parser@latest +go install github.com/publiccodeyml/libpubliccode/v5/publiccode-parser@latest ``` -Or get a precompiled package from the [release page](https://github.com/italia/publiccode-parser-go/releases/latest) +Or get a precompiled package from the [release page](https://github.com/publiccodeyml/libpubliccode/releases/latest) Example: @@ -79,7 +79,7 @@ guidelines. - [publiccode-parser-php](https://github.com/bfabio/publiccode-parser-php) - PHP bindings for this library -- [publiccode-crawler](https://github.com/italia/publiccode-crawler) - a Go +- [publiccode-crawler](https://github.com/publiccodeyml/publiccode-crawler) - a Go crawler that uses this library ## Maintainers diff --git a/SECURITY.md b/SECURITY.md index a0c04ab..95dc442 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,6 +2,6 @@ ## Reporting a vulnerability -Report security vulnerabilities via [GitHub private vulnerability reporting](https://github.com/italia/publiccode-parser-go/security/advisories/new). +Report security vulnerabilities via [GitHub private vulnerability reporting](https://github.com/publiccodeyml/libpubliccode/security/advisories/new). Do not open a public issue. diff --git a/example_test.go b/example_test.go index a3eff82..5fdf555 100644 --- a/example_test.go +++ b/example_test.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - publiccode "github.com/italia/publiccode-parser-go/v5" + publiccode "github.com/publiccodeyml/libpubliccode/v5" ) func ExampleNewDefaultParser() { diff --git a/fields.go b/fields.go index f90f5b8..c875bcc 100644 --- a/fields.go +++ b/fields.go @@ -6,7 +6,7 @@ import ( "strings" "github.com/alranel/go-vcsurl/v2" - urlutil "github.com/italia/publiccode-parser-go/v5/internal" + urlutil "github.com/publiccodeyml/libpubliccode/v5/internal" ) type validateFn func(publiccode PublicCode, parser *Parser, network bool, baseURL *url.URL) error diff --git a/go.mod b/go.mod index 67b2ec1..7e3eff3 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/italia/publiccode-parser-go/v5 +module github.com/publiccodeyml/libpubliccode/v5 require ( github.com/alranel/go-vcsurl/v2 v2.1.1 diff --git a/internal/netutil.go b/internal/netutil.go index 7461714..677216d 100644 --- a/internal/netutil.go +++ b/internal/netutil.go @@ -7,7 +7,7 @@ import ( "path" "path/filepath" - "github.com/italia/publiccode-parser-go/v5/internal/httpclient" + "github.com/publiccodeyml/libpubliccode/v5/internal/httpclient" ) // downloadFile download the file in the path. diff --git a/internal/netutil_test.go b/internal/netutil_test.go index d1078cb..9492855 100644 --- a/internal/netutil_test.go +++ b/internal/netutil_test.go @@ -7,7 +7,7 @@ import ( "os" "testing" - "github.com/italia/publiccode-parser-go/v5/internal/httpclient" + "github.com/publiccodeyml/libpubliccode/v5/internal/httpclient" ) func newTestClient(httpClient *http.Client) *httpclient.Client { diff --git a/parser.go b/parser.go index 98b9fd1..6f8e014 100644 --- a/parser.go +++ b/parser.go @@ -25,9 +25,9 @@ import ( yaml "github.com/goccy/go-yaml" "github.com/goccy/go-yaml/ast" "github.com/goccy/go-yaml/parser" - urlutil "github.com/italia/publiccode-parser-go/v5/internal" - "github.com/italia/publiccode-parser-go/v5/internal/httpclient" - publiccodeValidator "github.com/italia/publiccode-parser-go/v5/validators" + urlutil "github.com/publiccodeyml/libpubliccode/v5/internal" + "github.com/publiccodeyml/libpubliccode/v5/internal/httpclient" + publiccodeValidator "github.com/publiccodeyml/libpubliccode/v5/validators" ) // Build Validator and Translator once at package init. diff --git a/publiccode-parser/publiccode_parser.go b/publiccode-parser/publiccode_parser.go index d5d8da5..c1bb687 100644 --- a/publiccode-parser/publiccode_parser.go +++ b/publiccode-parser/publiccode_parser.go @@ -9,7 +9,7 @@ import ( "os" "runtime/debug" - publiccode "github.com/italia/publiccode-parser-go/v5" + publiccode "github.com/publiccodeyml/libpubliccode/v5" ) var ( diff --git a/publiccode-parser/publiccode_parser_test.go b/publiccode-parser/publiccode_parser_test.go index bb5356d..750b643 100644 --- a/publiccode-parser/publiccode_parser_test.go +++ b/publiccode-parser/publiccode_parser_test.go @@ -7,7 +7,7 @@ import ( "strings" "testing" - publiccode "github.com/italia/publiccode-parser-go/v5" + publiccode "github.com/publiccodeyml/libpubliccode/v5" ) const ( diff --git a/publiccode.yml b/publiccode.yml index afead5f..c817e81 100644 --- a/publiccode.yml +++ b/publiccode.yml @@ -1,7 +1,7 @@ publiccodeYmlVersion: "0.5" -name: publiccode-parser-go -url: "https://github.com/italia/publiccode-parser-go" +name: libpubliccode +url: "https://github.com/publiccodeyml/libpubliccode" platforms: - linux @@ -18,7 +18,7 @@ description: en: shortDescription: "Go library and CLI tool for parsing and validating publiccode.yml files." longDescription: > - publiccode-parser-go is a Go library and command-line tool for parsing and + libpubliccode is a Go library and command-line tool for parsing and validating publiccode.yml files against the official standard. It performs syntactic and semantic validation, and verifies the existence of URLs. The library can be embedded in Go applications or used as a diff --git a/v0.go b/v0.go index 24268d4..37bfe00 100644 --- a/v0.go +++ b/v0.go @@ -4,7 +4,7 @@ import ( "fmt" yaml "github.com/goccy/go-yaml" - urlutil "github.com/italia/publiccode-parser-go/v5/internal" + urlutil "github.com/publiccodeyml/libpubliccode/v5/internal" ) // PublicCodeV0 defines how a publiccode.yml v0.x is structured. diff --git a/v1.go b/v1.go index cba0e3f..dd76c86 100644 --- a/v1.go +++ b/v1.go @@ -4,7 +4,7 @@ import ( "fmt" yaml "github.com/goccy/go-yaml" - urlutil "github.com/italia/publiccode-parser-go/v5/internal" + urlutil "github.com/publiccodeyml/libpubliccode/v5/internal" ) // PublicCodeV1 defines how a publiccode.yml v1.x is structured. diff --git a/validations.go b/validations.go index 02bacea..2648863 100644 --- a/validations.go +++ b/validations.go @@ -18,8 +18,8 @@ import ( "strings" "github.com/alranel/go-vcsurl/v2" - "github.com/italia/publiccode-parser-go/v5/data" - netutil "github.com/italia/publiccode-parser-go/v5/internal" + "github.com/publiccodeyml/libpubliccode/v5/data" + netutil "github.com/publiccodeyml/libpubliccode/v5/internal" ) func init() { diff --git a/validators/it.go b/validators/it.go index 4af6d35..8f68bde 100644 --- a/validators/it.go +++ b/validators/it.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/go-playground/validator/v10" - "github.com/italia/publiccode-parser-go/v5/data" + "github.com/publiccodeyml/libpubliccode/v5/data" ) // ipaCodes is a set of valid IPA codes, lowercased for case-insensitive lookup.