You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: scw/README.md
-5Lines changed: 0 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,11 +23,6 @@ The function [`GetConfigPath`](https://godoc.org/github.com/scaleway/scaleway-sd
23
23
3. Unix home directory: `$HOME/.config/scw/config.yaml`
24
24
4. Windows home directory: `%USERPROFILE%/.config/scw/config.yaml`
25
25
26
-
## V1 config (DEPRECATED)
27
-
28
-
The V1 config (AKA legacy config) `.scwrc` is deprecated.
29
-
To migrate the V1 config to the new format use the function [`MigrateLegacyConfig`](https://godoc.org/github.com/scaleway/scaleway-sdk-go/scw#MigrateLegacyConfig), this will create a [proper config file](#tl-dr) the new [config file path](#config-file-path).
30
-
31
26
## Reading config order
32
27
33
28
[ClientOption](https://godoc.org/github.com/scaleway/scaleway-sdk-go/scw#ClientOption) ordering will decide the order in which the config should apply:
returnnil, errors.New("found legacy config in %s: legacy config is not allowed, please switch to the new config file format: %s", path, documentationLink)
230
-
}
231
-
232
226
confV2, err:=unmarshalConfV2(file)
233
227
iferr!=nil {
234
228
returnnil, errors.Wrap(err, "content of config file %s is invalid", path)
expectedError: "scaleway-sdk-go: found legacy config in {HOME}/valid2/test.conf: legacy config is not allowed, please switch to the new config file format: "+documentationLink,
439
-
},
440
-
{
441
-
name: "Err: default config with invalid V1",
442
-
env: map[string]string{
443
-
"HOME": "{HOME}",
444
-
},
445
-
files: map[string]string{
446
-
".scwrc": v1InvalidConfigFile,
447
-
},
448
-
expectedError: "scaleway-sdk-go: content of config file {HOME}/.scwrc is invalid json: invalid character ':' after top-level value",
0 commit comments