Skip to content

Commit 2e296bc

Browse files
committed
fix: linting fixed
1 parent e1fb73f commit 2e296bc

16 files changed

Lines changed: 39 additions & 39 deletions

alioss/client/client.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,21 @@ func (client *AliBlobstore) getMD5(filePath string) (string, error) {
8080
}
8181

8282
func (client *AliBlobstore) List(prefix string) ([]string, error) {
83-
return nil, errors.New("Not implemented")
83+
return nil, errors.New("not implemented")
8484
}
8585

8686
func (client *AliBlobstore) Copy(srcBlob string, dstBlob string) error {
87-
return errors.New("Not implemented")
87+
return errors.New("not implemented")
8888
}
8989

9090
func (client *AliBlobstore) Properties(dest string) error {
91-
return errors.New("Not implemented")
91+
return errors.New("not implemented")
9292
}
9393

9494
func (client *AliBlobstore) EnsureStorageExists() error {
95-
return errors.New("Not implemented")
95+
return errors.New("not implemented")
9696
}
9797

9898
func (client *AliBlobstore) DeleteRecursive(prefix string) error {
99-
return errors.New("Not implemented")
99+
return errors.New("not implemented")
100100
}

azurebs/integration/general_azure_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313

1414
var _ = Describe("General testing for all Azure regions", func() {
1515
var defaultConfig config.AZStorageConfig
16-
var storageType string = "azurebs"
16+
storageType := "azurebs"
1717

1818
BeforeEach(func() {
1919
defaultConfig = config.AZStorageConfig{

gcs/client/client.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -246,21 +246,21 @@ func (client *GCSBlobstore) Sign(id string, action string, expiry time.Duration)
246246
}
247247

248248
func (client *GCSBlobstore) List(prefix string) ([]string, error) {
249-
return nil, errors.New("Not implemented")
249+
return nil, errors.New("not implemented")
250250
}
251251

252252
func (client *GCSBlobstore) Copy(srcBlob string, dstBlob string) error {
253-
return errors.New("Not implemented")
253+
return errors.New("not implemented")
254254
}
255255

256256
func (client *GCSBlobstore) Properties(dest string) error {
257-
return errors.New("Not implemented")
257+
return errors.New("not implemented")
258258
}
259259

260260
func (client *GCSBlobstore) EnsureStorageExists() error {
261-
return errors.New("Not implemented")
261+
return errors.New("not implemented")
262262
}
263263

264264
func (client *GCSBlobstore) DeleteRecursive(prefix string) error {
265-
return errors.New("Not implemented")
265+
return errors.New("not implemented")
266266
}

gcs/integration/assertions.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const NoLongMsg = "environment variable %s filled, skipping long test"
3636
// This is using gomega matchers, so it will fail if called outside an
3737
// 'It' test.
3838
func AssertLifecycleWorks(gcsCLIPath string, ctx AssertContext) {
39-
var storageType string = "gcs"
39+
storageType := "gcs"
4040
session, err := RunGCSCLI(gcsCLIPath, ctx.ConfigPath, storageType, "put", ctx.ContentFile, ctx.GCSFileName)
4141
Expect(err).ToNot(HaveOccurred())
4242
Expect(session.ExitCode()).To(BeZero())

gcs/integration/gcs_encryption_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ var encryptionKeyBytes = []byte{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14
3535
var encryptionKeyBytesHash = sha256.Sum256(encryptionKeyBytes) //nolint:unused
3636

3737
var _ = Describe("Integration", func() {
38-
var storageType string = "gcs"
38+
storageType := "gcs"
3939
Context("general (Default Applicaton Credentials) configuration", func() {
4040
var (
4141
env AssertContext

gcs/integration/gcs_general_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ import (
2929
)
3030

3131
var _ = Describe("Integration", func() {
32-
var storageType string = "gcs"
32+
storageType := "gcs"
33+
3334
Context("general (Default Applicaton Credentials) configuration", func() {
3435
var env AssertContext
3536
BeforeEach(func() {
@@ -103,9 +104,9 @@ var _ = Describe("Integration", func() {
103104

104105
go func() {
105106
// This will block until the main test opens the pipe for reading.
106-
writer, _ := os.OpenFile(pipePath, os.O_WRONLY, 0)
107+
writer, _ := os.OpenFile(pipePath, os.O_WRONLY, 0) //nolint:errcheck
107108
if writer != nil {
108-
writer.Close()
109+
writer.Close() //nolint:errcheck
109110
}
110111
}()
111112

gcs/integration/gcs_public_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
)
3131

3232
var _ = Describe("GCS Public Bucket", func() {
33-
var storageType string = "gcs"
33+
storageType := "gcs"
3434
Context("with read-only configuration", func() {
3535
var (
3636
setupEnv AssertContext

gcs/integration/gcs_static_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828
)
2929

3030
var _ = Describe("Integration", func() {
31-
var storageType string = "gcs"
31+
storageType := "gcs"
3232
Context("static credentials configuration with a regional bucket", func() {
3333
var (
3434
ctx AssertContext

s3/client/client.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,25 +66,25 @@ func (c *S3CompatibleClient) Sign(objectID string, action string, expiration tim
6666
}
6767

6868
func (c *S3CompatibleClient) EnsureStorageExists() error {
69-
return errors.New("Not implemented")
69+
return errors.New("not implemented")
7070

7171
}
7272

7373
func (c *S3CompatibleClient) Copy(srcBlob string, dstBlob string) error {
74-
return errors.New("Not implemented")
74+
return errors.New("not implemented")
7575

7676
}
7777

7878
func (c *S3CompatibleClient) Properties(dest string) error {
79-
return errors.New("Not implemented")
79+
return errors.New("not implemented")
8080

8181
}
8282

8383
func (c *S3CompatibleClient) List(prefix string) ([]string, error) {
84-
return nil, errors.New("Not implemented")
84+
return nil, errors.New("not implemented")
8585

8686
}
8787

8888
func (c *S3CompatibleClient) DeleteRecursive(prefix string) error {
89-
return errors.New("Not implemented")
89+
return errors.New("not implemented")
9090
}

s3/integration/assertions.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818

1919
// AssertLifecycleWorks tests the main blobstore object lifecycle from creation to deletion
2020
func AssertLifecycleWorks(s3CLIPath string, cfg *config.S3Cli) {
21-
var storageType string = "s3"
21+
storageType := "s3"
2222
expectedString := GenerateRandomString()
2323
s3Filename := GenerateRandomString()
2424

@@ -99,7 +99,7 @@ func AssertOnPutFailures(s3CLIPath string, cfg *config.S3Cli, content, errorMess
9999

100100
// AssertPutOptionsApplied asserts that `s3cli put` uploads files with the requested encryption options
101101
func AssertPutOptionsApplied(s3CLIPath string, cfg *config.S3Cli) {
102-
var storageType string = "s3"
102+
storageType := "s3"
103103
expectedString := GenerateRandomString()
104104
s3Filename := GenerateRandomString()
105105

@@ -140,7 +140,7 @@ func AssertPutOptionsApplied(s3CLIPath string, cfg *config.S3Cli) {
140140

141141
// AssertGetNonexistentFails asserts that `s3cli get` on a non-existent object will fail
142142
func AssertGetNonexistentFails(s3CLIPath string, cfg *config.S3Cli) {
143-
var storageType string = "s3"
143+
storageType := "s3"
144144
configPath := MakeConfigFile(cfg)
145145
defer os.Remove(configPath) //nolint:errcheck
146146

@@ -153,7 +153,7 @@ func AssertGetNonexistentFails(s3CLIPath string, cfg *config.S3Cli) {
153153
// AssertDeleteNonexistentWorks asserts that `s3cli delete` on a non-existent
154154
// object exits with status 0 (tests idempotency)
155155
func AssertDeleteNonexistentWorks(s3CLIPath string, cfg *config.S3Cli) {
156-
var storageType string = "s3"
156+
storageType := "s3"
157157
configPath := MakeConfigFile(cfg)
158158
defer os.Remove(configPath) //nolint:errcheck
159159

0 commit comments

Comments
 (0)