Skip to content

Commit

Permalink
cli: uppercase placeholders
Browse files Browse the repository at this point in the history
  • Loading branch information
pulsejet committed Jan 29, 2025
1 parent 6e88bca commit 322f291
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Reference:
ID: "run",
Title: "Forwarder Daemon",
})
fw.CmdYaNFD.Use = "run config-file"
fw.CmdYaNFD.Use = "run CONFIG-FILE"
fw.CmdYaNFD.Short = "Start the NDN Forwarding Daemon"
cmdFw.AddCommand(fw.CmdYaNFD)

Expand Down Expand Up @@ -105,7 +105,7 @@ Reference:
ID: "run",
Title: "Router Daemon",
})
dv.CmdDv.Use = "run config-file"
dv.CmdDv.Use = "run CONFIG-FILE"
dv.CmdDv.Short = "Start the NDN Distance Vector Daemon"
cmdDv.AddCommand(dv.CmdDv)

Expand Down
2 changes: 1 addition & 1 deletion cmd/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

var cmdDaemon = &cobra.Command{
Use: "daemon config-file",
Use: "daemon CONFIG-FILE",
Short: "NDN Combined Daemon",
Long: "NDN Forwarder-Router combined daemon",
Example: ` https://github.com/named-data/ndnd/blob/main/docs/daemon-example.md`,
Expand Down
2 changes: 1 addition & 1 deletion dv/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

var CmdDv = &cobra.Command{
Use: "ndn-dv config-file",
Use: "ndn-dv CONFIG-FILE",
Short: "NDN Distance Vector Routing Daemon",
GroupID: "run",
Version: utils.NDNdVersion,
Expand Down
2 changes: 1 addition & 1 deletion fw/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
var config = core.DefaultConfig()

var CmdYaNFD = &cobra.Command{
Use: "yanfd config-file",
Use: "yanfd CONFIG-FILE",
Short: "Yet another NDN Forwarding Daemon",
GroupID: "run",
Version: utils.NDNdVersion,
Expand Down
2 changes: 1 addition & 1 deletion tools/catchunks.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func CmdCatChunks() *cobra.Command {

return &cobra.Command{
GroupID: "tools",
Use: "cat name",
Use: "cat PREFIX",
Short: "Retrieve object under a name prefix",
Long: `Retrieve an object with the specified name.
The object contents are written to stdout on success.`,
Expand Down
4 changes: 2 additions & 2 deletions tools/dvc/dvc.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ func Cmds() []*cobra.Command {
Args: cobra.NoArgs,
Run: t.RunDvStatus,
}, {
Use: "link-create neighbor-uri",
Use: "link-create NEIGHBOR-URI",
Short: "Create a new active neighbor link",
Args: cobra.ExactArgs(1),
Run: t.RunDvLinkCreate,
}, {
Use: "link-destroy neighbor-uri",
Use: "link-destroy NEIGHBOR-URI",
Short: "Destroy an active neighbor link",
Args: cobra.ExactArgs(1),
Run: t.RunDvLinkDestroy,
Expand Down
12 changes: 6 additions & 6 deletions tools/nfdc/nfdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ func Cmds() []*cobra.Command {
Args: cobra.NoArgs,
Run: t.ExecFaceList,
}, {
Use: "face-create [options]",
Use: "face-create [params]",
Short: "Create a face",
Args: cobra.ArbitraryArgs,
Run: cmd("faces", "create", []string{
"persistency=persistent",
}),
}, {
Use: "face-destroy [options]",
Use: "face-destroy [params]",
Short: "Destroy a face",
Args: cobra.ArbitraryArgs,
Run: cmd("faces", "destroy", []string{}),
Expand All @@ -46,14 +46,14 @@ func Cmds() []*cobra.Command {
Args: cobra.NoArgs,
Run: t.ExecRouteList,
}, {
Use: "route-add [options]",
Use: "route-add [params]",
Short: "Add a route to the RIB",
Args: cobra.ArbitraryArgs,
Run: cmd("rib", "register", []string{
"cost=0", "origin=255",
}),
}, {
Use: "route-remove [options]",
Use: "route-remove [params]",
Short: "Remove a route from the RIB",
Args: cobra.ArbitraryArgs,
Run: cmd("rib", "unregister", []string{
Expand All @@ -75,12 +75,12 @@ func Cmds() []*cobra.Command {
Args: cobra.NoArgs,
Run: t.ExecStrategyList,
}, {
Use: "strategy-set [options]",
Use: "strategy-set [params]",
Short: "Set strategy choice",
Args: cobra.ArbitraryArgs,
Run: cmd("strategy-choice", "set", []string{}),
}, {
Use: "strategy-unset [options]",
Use: "strategy-unset [params]",
Short: "Unset strategy choice",
Args: cobra.ArbitraryArgs,
Run: cmd("strategy-choice", "unset", []string{}),
Expand Down
2 changes: 1 addition & 1 deletion tools/pingclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func CmdPingClient() *cobra.Command {

cmd := &cobra.Command{
GroupID: "tools",
Use: "ping name",
Use: "ping PREFIX",
Short: "Send Interests to a ping server",
Long: `Ping a name prefix using Interests like /prefix/ping/number
The numbers in the Interests are randomly generated`,
Expand Down
2 changes: 1 addition & 1 deletion tools/pingserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func CmdPingServer() *cobra.Command {

return &cobra.Command{
GroupID: "tools",
Use: "pingserver name",
Use: "pingserver PREFIX",
Short: "Start a ping server under a name prefix",
Args: cobra.ExactArgs(1),
Example: ` ndnd pingserver /my/prefix`,
Expand Down
2 changes: 1 addition & 1 deletion tools/putchunks.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func CmdPutChunks() *cobra.Command {

cmd := &cobra.Command{
GroupID: "tools",
Use: "put name",
Use: "put PREFIX",
Short: "Publish data under a name prefix",
Long: `Publish data under a name prefix.
This tool expects data from the standard input.`,
Expand Down
2 changes: 1 addition & 1 deletion tools/sec/cert_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func CmdCertCli() *cobra.Command {

cmd := &cobra.Command{
GroupID: "sec",
Use: "certcli ca-file",
Use: "certcli CA-CERT-FILE",
Short: "NDNCERT Certificate Client",
Long: `Interactive client for the NDNCERT CA.
Expand Down
6 changes: 3 additions & 3 deletions tools/sec/keychain.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func (t *ToolKeychain) configure(cmd *cobra.Command) {

cmd.AddCommand(&cobra.Command{
GroupID: "keychain",
Use: "key-list keychain-uri",
Use: "key-list KEYCHAIN-URI",
Short: "List keys in a keychain",
Run: t.List,
Args: cobra.ExactArgs(1),
Expand All @@ -33,7 +33,7 @@ func (t *ToolKeychain) configure(cmd *cobra.Command) {

cmd.AddCommand(&cobra.Command{
GroupID: "keychain",
Use: "key-import keychain-uri",
Use: "key-import KEYCHAIN-URI",
Short: "Import keys or certs to a keychain",
Long: `Import keys or certs to a keychain.
Expand All @@ -46,7 +46,7 @@ and inserts them into the specified keychain.`,

cmd.AddCommand(&cobra.Command{
GroupID: "keychain",
Use: "key-export keychain-uri key-name",
Use: "key-export KEYCHAIN-URI KEY-NAME",
Short: "Export a key from a keychain",
Long: `Export the specified key from a keychain.
If no KEY is specified, name will be treated as an identity
Expand Down
2 changes: 1 addition & 1 deletion tools/sec/keygen.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (t *ToolKeygen) configure(cmd *cobra.Command) {

cmd.AddCommand(&cobra.Command{
GroupID: "key",
Use: "keygen name key-type [params]",
Use: "keygen IDENTITY KEY-TYPE [params]",
Short: "Generate a new NDN key pair",
Args: cobra.MinimumNArgs(2),
Example: ` ndnd sec keygen /alice ed25519
Expand Down
2 changes: 1 addition & 1 deletion tools/sec/sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type ToolSignCert struct {
func (t *ToolSignCert) configure(root *cobra.Command) {
cmd := &cobra.Command{
GroupID: "key",
Use: "sign-cert key-file",
Use: "sign-cert KEY-FILE",
Short: "Sign a new NDN certificate",
Long: `Sign a new NDN certificate
Expand Down

0 comments on commit 322f291

Please sign in to comment.