Skip to content

Commit 281dd22

Browse files
fix: cleanup unused code (#217)
1 parent e4a1a91 commit 281dd22

File tree

3 files changed

+0
-36
lines changed

3 files changed

+0
-36
lines changed

scw/client_option.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,5 @@ func (s *settings) validate() error {
195195
return errors.New("default zone cannot be empty")
196196
}
197197

198-
if s.defaultPageSize != nil && *s.defaultPageSize <= 0 {
199-
return errors.New("default page size cannot be <= 0")
200-
}
201-
202198
return nil
203199
}

scw/client_test.go

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -39,30 +39,6 @@ func TestNewClientWithDefaults(t *testing.T) {
3939

4040
}
4141

42-
type mockConfig struct{}
43-
44-
func (c *mockConfig) GetAccessKey() (string, bool) {
45-
return testAccessKey, true
46-
}
47-
func (c *mockConfig) GetSecretKey() (string, bool) {
48-
return testSecretKey, true
49-
}
50-
func (c *mockConfig) GetAPIURL() (string, bool) {
51-
return testAPIURL, true
52-
}
53-
func (c *mockConfig) GetInsecure() (bool, bool) {
54-
return testInsecure, true
55-
}
56-
func (c *mockConfig) GetDefaultOrganizationID() (string, bool) {
57-
return testDefaultOrganizationID, true
58-
}
59-
func (c *mockConfig) GetDefaultRegion() (Region, bool) {
60-
return testDefaultRegion, true
61-
}
62-
func (c *mockConfig) GetDefaultZone() (Zone, bool) {
63-
return testDefaultZone, true
64-
}
65-
6642
func TestNewClientWithOptions(t *testing.T) {
6743

6844
t.Run("Basic", func(t *testing.T) {

scw/path.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ var (
1919
ErrNoHomeDir = errors.New("user home directory not found")
2020
)
2121

22-
func inConfigFile() string {
23-
v2path, exist := getConfigV2FilePath()
24-
if exist {
25-
return "in config file " + v2path
26-
}
27-
return ""
28-
}
29-
3022
// GetConfigPath returns the default path.
3123
// Default path is base on the following priority order:
3224
// - $SCW_CONFIG_PATH

0 commit comments

Comments
 (0)