scaleway-cli
scaleway-cli copied to clipboard
Improve argument validation nic
Description
create nic seems ok except that it lacks validation
$ go run cmd/scw/main.go instance private-nic create server-id=08fd9f26-efe4-41cc-b960-11ff86edbd8d
Invalid arguments 'private_network_id'
Details:
- 'private_network_id' does not respect constraints
Hint:
Required key not provided
exit status 1
while e.g. you forget the server-id in list it's more concise and clearer, there it feels like it's the api error (because of the snake_case in particular)
$ go run cmd/scw/main.go instance private-nic list
Missing required argument 'server-id'
exit status 1
How this functionality would be exposed
References
Version
Version 2.0.0+dev BuildDate unknown GoVersion go1.15.1 GitBranch unknown GitCommit unknown GoArch amd64 GoOS darwin