Skip to content

Commit 0a145b3

Browse files
authored
chore: document handwritten 'scw instance security-group update' (#694)
1 parent a0a79b9 commit 0a145b3

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ require (
2323
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.5.0.20200211104822-047c88bb15c4
2424
github.com/sergi/go-diff v1.0.0 // indirect
2525
github.com/spf13/cobra v0.0.5
26-
github.com/spf13/pflag v1.0.5
26+
github.com/spf13/pflag v1.0.5 // indirect
2727
github.com/stretchr/testify v1.4.0
2828
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586
2929
golang.org/x/sys v0.0.0-20191010194322-b09406accb47 // indirect

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
7272
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
7373
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
7474
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
75-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.5.0.20200130170711-05d27d10a3b8 h1:+y+U0MHG110iL4TkTKEb3Wh07OK7ALY2XbNFxeAEb80=
76-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.5.0.20200130170711-05d27d10a3b8/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8=
7775
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.5.0.20200211104822-047c88bb15c4 h1:7MhGZPXmbEqx97kIrBA7Xen1obsqQPnR0HKErxh76S4=
7876
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.5.0.20200211104822-047c88bb15c4/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8=
7977
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=

internal/namespaces/instance/v1/custom_security_group.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,11 @@ func securityGroupClearCommand() *core.Command {
292292
}
293293
}
294294

295+
// securityGroupUpdateCommand updates a security-group.
296+
// Because the API for SecurityGroup works with a PUT but not a PATCH,
297+
// the method UpdateSecurityGroup() is not generated.
298+
// Instead, setSecurityGroup() is generated, and a custom UpdateSecurityGroup() method is handwritten the SDK.
299+
// This is why 'scw instance security-group update' needs to be written by hand.
295300
func securityGroupUpdateCommand() *core.Command {
296301
return &core.Command{
297302
Short: `Update security group`,

0 commit comments

Comments
 (0)