New Upstream Release - golang-github-go-openapi-errors

Ready changes

Summary

Merged new upstream version: 0.20.3 (was: 0.20.2).

Resulting package

Built on 2023-05-23T05:48 (took 4m37s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-releases golang-github-go-openapi-errors-dev

Lintian Result

Diff

diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index d736828..6905123 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -9,6 +9,7 @@ jobs:
     strategy:
       matrix:
         os: [ ubuntu-latest, macos-latest, windows-latest ]
+        go: [1.18, 1.19]
       fail-fast: false
 
     steps:
@@ -17,12 +18,12 @@ jobs:
     - name: Set up Go
       uses: actions/setup-go@v2
       with:
-        go-version: 1.17.1
+        go-version: ${{ matrix.go }}
 
     - name: Setup gotestsum
       uses: autero1/action-gotestsum@v1.0.0
       with:
-        gotestsum_version: 1.7.0
+        gotestsum_version: 1.8.1
 
     - name: Test
       run: gotestsum --format short-verbose -- -race -timeout=20m -coverprofile=coverage_txt -covermode=atomic ./...
diff --git a/.golangci.yml b/.golangci.yml
index 449a43c..4e1fc0c 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -44,3 +44,5 @@ linters:
     - cyclop
     - errname
     - varnamelen
+    - exhaustruct
+    - maintidx
diff --git a/api.go b/api.go
index 854d6ee..77f1f92 100644
--- a/api.go
+++ b/api.go
@@ -99,6 +99,7 @@ func (m MethodNotAllowedError) MarshalJSON() ([]byte, error) {
 }
 
 func errorAsJSON(err Error) []byte {
+	//nolint:errchkjson
 	b, _ := json.Marshal(struct {
 		Code    int32  `json:"code"`
 		Message string `json:"message"`
@@ -146,7 +147,7 @@ func ServeError(rw http.ResponseWriter, r *http.Request, err error) {
 			ServeError(rw, r, nil)
 		}
 	case *MethodNotAllowedError:
-		rw.Header().Add("Allow", strings.Join(err.(*MethodNotAllowedError).Allowed, ","))
+		rw.Header().Add("Allow", strings.Join(e.Allowed, ","))
 		rw.WriteHeader(asHTTPCode(int(e.Code())))
 		if r == nil || r.Method != http.MethodHead {
 			_, _ = rw.Write(errorAsJSON(e))
diff --git a/debian/changelog b/debian/changelog
index 2cff099..5df15ee 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+golang-github-go-openapi-errors (0.20.3-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Tue, 23 May 2023 05:44:33 -0000
+
 golang-github-go-openapi-errors (0.20.2-1) unstable; urgency=medium
 
   * Team upload.
diff --git a/doc.go b/doc.go
index 963d427..af01190 100644
--- a/doc.go
+++ b/doc.go
@@ -13,7 +13,6 @@
 // limitations under the License.
 
 /*
-
 Package errors provides an Error interface and several concrete types
 implementing this interface to manage API errors and JSON-schema validation
 errors.
@@ -23,6 +22,5 @@ it defines.
 
 It is used throughout the various go-openapi toolkit libraries
 (https://github.com/go-openapi).
-
 */
 package errors
diff --git a/go.mod b/go.mod
index d7a9030..ca6e5dc 100644
--- a/go.mod
+++ b/go.mod
@@ -8,5 +8,5 @@ require (
 	github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
 	github.com/stretchr/testify v1.6.1
 	gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
-	gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c // indirect
+	gopkg.in/yaml.v3 v3.0.1 // indirect
 )
diff --git a/go.sum b/go.sum
index ecd91c7..5dc27c4 100644
--- a/go.sum
+++ b/go.sum
@@ -24,3 +24,5 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c h1:grhR+C34yXImVGp7EzNk+DTIk+323eIUWOmEevy6bDo=
 gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/middleware.go b/middleware.go
index c26ad48..963472d 100644
--- a/middleware.go
+++ b/middleware.go
@@ -28,7 +28,6 @@ type APIVerificationFailed struct {
 	MissingRegistration  []string `json:"missingRegistration,omitempty"`
 }
 
-//
 func (v *APIVerificationFailed) Error() string {
 	buf := bytes.NewBuffer(nil)
 

Debdiff

File lists identical (after any substitutions)

No differences were encountered in the control files

More details

Full run details