Skip to content

Commit 21759a2

Browse files
committed
Merge branch 'update-go-1.18' into 'master'
chore(engine): update Go to 1.18 and fix linter warnings See merge request postgres-ai/database-lab!498
2 parents cfaaa95 + ecf5e04 commit 21759a2

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Diff for: engine/.gitlab-ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
default:
2-
image: golang:1.17
2+
image: golang:1.18
33

44
stages:
55
- test
@@ -56,7 +56,7 @@ lint:
5656
### Build binary.
5757
build-binary-alpine:
5858
<<: *only_engine
59-
image: golang:1.17-alpine
59+
image: golang:1.18-alpine
6060
stage: build-binary
6161
artifacts:
6262
paths:

Diff for: engine/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ help: ## Display the help message
3232
all: clean build ## Build all binary components of the project
3333

3434
install-lint: ## Install the linter to $GOPATH/bin which is expected to be in $PATH
35-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.42.1
35+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.45.0
3636

3737
run-lint: ## Run linters
3838
golangci-lint run

Diff for: engine/cmd/cli/commands/config/environment.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func AddEnvironmentToConfig(c *cli.Context, cfg *CLIConfig, environmentID string
4747
}
4848

4949
if _, ok := cfg.Environments[environmentID]; ok {
50-
return errors.Errorf("Environment %q is already initialized.", environmentID)
50+
return errors.Errorf("environment %q is already initialized", environmentID)
5151
}
5252

5353
env := Environment{
@@ -80,7 +80,7 @@ func updateEnvironmentInConfig(c *cli.Context, cfg *CLIConfig, environmentID str
8080

8181
environment, ok := cfg.Environments[environmentID]
8282
if !ok {
83-
return errors.Errorf("Environment %q not found.", environmentID)
83+
return errors.Errorf("environment %q not found", environmentID)
8484
}
8585

8686
if c.NumFlags() == 0 {
@@ -135,7 +135,7 @@ func switchToEnvironment(cfg *CLIConfig, environmentID string) error {
135135

136136
_, ok := cfg.Environments[environmentID]
137137
if !ok {
138-
return errors.Errorf("Environment %q not found.", environmentID)
138+
return errors.Errorf("environment %q not found", environmentID)
139139
}
140140

141141
cfg.CurrentEnvironment = environmentID
@@ -151,7 +151,7 @@ func removeByID(cfg *CLIConfig, environmentID string) error {
151151

152152
_, ok := cfg.Environments[environmentID]
153153
if !ok {
154-
return errors.Errorf("Environment %q not found.", environmentID)
154+
return errors.Errorf("environment %q not found", environmentID)
155155
}
156156

157157
delete(cfg.Environments, environmentID)

0 commit comments

Comments
 (0)