Skip to content

Commit 28fa547

Browse files
authored
chore: enable var-declaration from revive linter (#2942)
Signed-off-by: Matthieu MOREL <[email protected]>
1 parent 6c6568b commit 28fa547

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ linters-settings:
7272
- name: use-any
7373
disabled: true
7474
- name: var-declaration
75-
disabled: true
7675
- name: var-naming
7776
disabled: true
7877
testifylint:

container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ func (c *ContainerRequest) Validate() error {
226226
// GetContext retrieve the build context for the request
227227
// Must be closed when no longer needed.
228228
func (c *ContainerRequest) GetContext() (io.Reader, error) {
229-
var includes []string = []string{"."}
229+
includes := []string{"."}
230230

231231
if c.ContextArchive != nil {
232232
return c.ContextArchive, nil

internal/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const ReaperDefaultImage = "testcontainers/ryuk:0.11.0"
1515

1616
var (
1717
tcConfig Config
18-
tcConfigOnce *sync.Once = new(sync.Once)
18+
tcConfigOnce = new(sync.Once)
1919
)
2020

2121
// testcontainersConfig {

internal/core/images_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ const (
1717
)
1818

1919
func TestExtractImagesFromDockerfile(t *testing.T) {
20-
var baseImage string = "scratch"
21-
var registryHost string = "localhost"
22-
var registryPort string = "5000"
23-
var nginxImage string = "nginx:latest"
20+
baseImage := "scratch"
21+
registryHost := "localhost"
22+
registryPort := "5000"
23+
nginxImage := "nginx:latest"
2424

2525
tests := []struct {
2626
name string

modules/dynamodb/dynamodb_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const (
2525
baseImage string = "amazon/dynamodb-local:"
2626
)
2727

28-
var image2_2_1 string = baseImage + "2.2.1"
28+
var image2_2_1 = baseImage + "2.2.1"
2929

3030
func TestRun(t *testing.T) {
3131
ctx := context.Background()

0 commit comments

Comments
 (0)