Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 13 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -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"
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"strings"

publiccode "github.com/italia/publiccode-parser-go/v5"
publiccode "github.com/publiccodeyml/libpubliccode/v5"
)

func ExampleNewDefaultParser() {
Expand Down
2 changes: 1 addition & 1 deletion fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion internal/netutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion internal/netutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion publiccode-parser/publiccode_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"os"
"runtime/debug"

publiccode "github.com/italia/publiccode-parser-go/v5"
publiccode "github.com/publiccodeyml/libpubliccode/v5"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion publiccode-parser/publiccode_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
"testing"

publiccode "github.com/italia/publiccode-parser-go/v5"
publiccode "github.com/publiccodeyml/libpubliccode/v5"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions publiccode.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion v0.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion v1.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions validations.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion validators/it.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Loading