Commit 0b6912e3 authored by Marcin Rataj's avatar Marcin Rataj

refactor: cleanup arg params

parent 1cb90d71
...@@ -56,8 +56,9 @@ const pinNameOptionName = "name" ...@@ -56,8 +56,9 @@ const pinNameOptionName = "name"
const pinCIDsOptionName = "cid" const pinCIDsOptionName = "cid"
const pinStatusOptionName = "status" const pinStatusOptionName = "status"
const pinServiceNameOptionName = "service" const pinServiceNameOptionName = "service"
const pinServiceEndpointOptionName = "endpoint" const pinServiceNameArgName = pinServiceNameOptionName
const pinServiceKeyOptionName = "key" const pinServiceEndpointArgName = "endpoint"
const pinServiceKeyArgName = "key"
const pinServiceStatOptionName = "stat" const pinServiceStatOptionName = "stat"
const pinBackgroundOptionName = "background" const pinBackgroundOptionName = "background"
const pinForceOptionName = "force" const pinForceOptionName = "force"
...@@ -119,7 +120,7 @@ Status of background pin requests can be inspected with the 'ls' command: ...@@ -119,7 +120,7 @@ Status of background pin requests can be inspected with the 'ls' command:
}, },
Arguments: []cmds.Argument{ Arguments: []cmds.Argument{
cmds.StringArg("ipfs-path-or-cid", true, false, "Path to object(s) to be pinned."), cmds.StringArg("ipfs-path", true, false, "Path to object(s) to be pinned."),
}, },
Options: []cmds.Option{ Options: []cmds.Option{
pinServiceNameOption, pinServiceNameOption,
...@@ -421,9 +422,9 @@ TIP: ...@@ -421,9 +422,9 @@ TIP:
`, `,
}, },
Arguments: []cmds.Argument{ Arguments: []cmds.Argument{
cmds.StringArg(pinServiceNameOptionName, true, false, "Service name."), cmds.StringArg(pinServiceNameArgName, true, false, "Service name."),
cmds.StringArg(pinServiceEndpointOptionName, true, false, "Service endpoint."), cmds.StringArg(pinServiceEndpointArgName, true, false, "Service endpoint."),
cmds.StringArg(pinServiceKeyOptionName, true, false, "Service key."), cmds.StringArg(pinServiceKeyArgName, true, false, "Service key."),
}, },
Type: nil, Type: nil,
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error { Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment