Skip to content

Commit db430ee

Browse files
committed
feat(mockery): allow PATCH requests
1 parent e823730 commit db430ee

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.21.1-alpine3.18 AS builder
1+
FROM golang:1.25-alpine AS builder
22

33
RUN apk update && apk add --no-cache git
44

@@ -8,7 +8,7 @@ RUN go get ./
88
RUN CGO_ENABLED=0 go build -o /app/http-mockery
99
RUN chmod +x /app/http-mockery
1010

11-
FROM alpine:3.18
11+
FROM alpine:3.23
1212

1313
COPY --from=builder /app/http-mockery /go/bin/http-mockery
1414
RUN apk update && apk add --no-cache ca-certificates

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module github.com/UpCloudLtd/http-mockery
22

3-
go 1.21
3+
go 1.24
44

55
require (
6-
github.com/stretchr/testify v1.8.4
6+
github.com/stretchr/testify v1.11.1
77
github.com/valyala/fasttemplate v1.2.2
88
)
99

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
22
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
33
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
44
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
5-
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
6-
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
5+
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
6+
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
77
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
88
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
99
github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo=

pkg/mockery/mockery.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@ import (
1818
"github.com/valyala/fasttemplate"
1919
)
2020

21-
var (
22-
ErrEndpointNotFound = fmt.Errorf("no matching endpoint found")
23-
)
21+
var ErrEndpointNotFound = fmt.Errorf("no matching endpoint found")
2422

25-
var validHTTPMethods = []string{http.MethodGet, http.MethodPost, http.MethodPut, http.MethodPost, http.MethodDelete}
23+
var validHTTPMethods = []string{http.MethodGet, http.MethodPost, http.MethodPut, http.MethodDelete, http.MethodPatch}
2624

2725
const (
2826
EndpointTypeNormal = "normal"

0 commit comments

Comments
 (0)