Skip to content

Commit a7ef219

Browse files
committed
BUILD/MINOR: diff: pin version of go method generator
1 parent 5f7aeed commit a7ef219

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ SWAGGER_VERSION=v0.32.3
44
GO_VERSION:=${shell go mod edit -json | jq -r .Go}
55
GOLANGCI_LINT_VERSION=2.8.0
66
CHECK_COMMIT=5.2.0
7+
GO_METHOD_GEN_VERSION=v0.1.1
78

89
.PHONY: test
910
test:
@@ -47,7 +48,7 @@ models: gentypes spec swagger-check go-method-gen-check
4748
.PHONY: go-method-gen-check
4849
go-method-gen-check:
4950
@GO_METHOD_GEN_BIN_NAME="go-method-gen"; \
50-
GO_METHOD_GEN_GITHUB="github.com/haproxytech/go-method-gen/cmd/go-method-gen@latest"; \
51+
GO_METHOD_GEN_GITHUB="github.com/haproxytech/go-method-gen/cmd/go-method-gen@${GO_METHOD_GEN_VERSION}"; \
5152
if [ -f "$$GO_METHOD_GEN_BIN_NAME" ]; then \
5253
echo "$$GO_METHOD_GEN_BIN_NAME already installed"; \
5354
else \

configuration/program.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ func ParseProgram(p parser.Parser, name string) (*models.Program, error) {
210210
}
211211
}
212212

213-
program.Command = misc.StringP((data.(*types.Command)).Args)
213+
program.Command = misc.StringP(data.(*types.Command).Args)
214214

215215
data, err = p.Get(parser.Program, name, "user")
216216
if err == nil {

e2e/test_client.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ func GetClient(t *testing.T) (*ClientResponse, error) { //nolint:thelper
8888
}
8989

9090
HAProxyCFG := "haproxy.cfg"
91-
confClient, err := configuration.New(t.Context(),
91+
confClient, err := configuration.New(
92+
t.Context(),
9293
configuration_options.ConfigurationFile(HAProxyCFG),
9394
// options.UsePersistentTransactions,
9495
configuration_options.TransactionsDir(os.TempDir()),
@@ -124,7 +125,8 @@ func GetClient(t *testing.T) (*ClientResponse, error) { //nolint:thelper
124125
if err != nil {
125126
return nil, err
126127
}
127-
nativeAPI, err := clientnative.New(t.Context(),
128+
nativeAPI, err := clientnative.New(
129+
t.Context(),
128130
options.Configuration(confClient),
129131
options.Runtime(runtimeClient),
130132
)

test/configuration_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,8 @@ func deleteTestFile(path string) error {
11941194
}
11951195

11961196
func prepareClient(path string) (c configuration.Configuration, err error) {
1197-
c, err = configuration.New(context.Background(),
1197+
c, err = configuration.New(
1198+
context.Background(),
11981199
options.ConfigurationFile(path),
11991200
options.HAProxyBin("echo"),
12001201
options.UseModelsValidation,

0 commit comments

Comments
 (0)