Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
e700b165
Commit
e700b165
authored
Nov 13, 2014
by
Matt Bell
Committed by
Juan Batiz-Benet
Nov 14, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ported remaining command helptext to HelpText struct
parent
6597a5f7
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
50 additions
and
19 deletions
+50
-19
cmd/ipfs2/daemon.go
cmd/ipfs2/daemon.go
+4
-1
cmd/ipfs2/init.go
cmd/ipfs2/init.go
+4
-3
cmd/ipfs2/tour.go
cmd/ipfs2/tour.go
+9
-3
core/commands2/block.go
core/commands2/block.go
+7
-3
core/commands2/config.go
core/commands2/config.go
+10
-4
core/commands2/diag.go
core/commands2/diag.go
+3
-1
core/commands2/pin.go
core/commands2/pin.go
+3
-1
core/commands2/publish.go
core/commands2/publish.go
+10
-3
No files found.
cmd/ipfs2/daemon.go
View file @
e700b165
...
...
@@ -15,8 +15,11 @@ import (
)
var
daemonCmd
=
&
cmds
.
Command
{
Helptext
:
cmds
.
HelpText
{
Tagline
:
"run a network-connected ipfs node"
,
// TODO adjust copy
},
Options
:
[]
cmds
.
Option
{},
Help
:
"run a network-connected ipfs node"
,
// TODO adjust copy
Subcommands
:
map
[
string
]
*
cmds
.
Command
{},
Run
:
daemonFunc
,
}
...
...
cmd/ipfs2/init.go
View file @
e700b165
...
...
@@ -15,9 +15,10 @@ import (
)
var
initCmd
=
&
cmds
.
Command
{
Description
:
"Initializes IPFS config file"
,
Help
:
`Initializes IPFS configuration files and generates a new keypair.
`
,
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Initializes IPFS config file"
,
ShortDescription
:
"Initializes IPFS configuration files and generates a new keypair."
,
},
Options
:
[]
cmds
.
Option
{
cmds
.
IntOption
(
"bits"
,
"b"
,
"Number of bits to use in the generated RSA private key (defaults to 4096)"
),
...
...
cmd/ipfs2/tour.go
View file @
e700b165
...
...
@@ -60,7 +60,9 @@ IPFS very quickly. To start, run:
}
var
cmdIpfsTourNext
=
&
cmds
.
Command
{
Description
:
"Show the next IPFS Tour topic"
,
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Show the next IPFS Tour topic"
,
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
var
w
bytes
.
Buffer
...
...
@@ -90,7 +92,9 @@ var cmdIpfsTourNext = &cmds.Command{
}
var
cmdIpfsTourRestart
=
&
cmds
.
Command
{
Description
:
"Restart the IPFS Tour"
,
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Restart the IPFS Tour"
,
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
path
:=
req
.
Context
()
.
ConfigRoot
...
...
@@ -109,7 +113,9 @@ var cmdIpfsTourRestart = &cmds.Command{
}
var
cmdIpfsTourList
=
&
cmds
.
Command
{
Description
:
"Show a list of IPFS Tour topics"
,
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Show a list of IPFS Tour topics"
,
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
cfg
,
err
:=
req
.
Context
()
.
GetConfig
()
...
...
core/commands2/block.go
View file @
e700b165
...
...
@@ -80,9 +80,13 @@ It outputs to stdout, and <key> is a base58 encoded multihash.
}
var
blockPutCmd
=
&
cmds
.
Command
{
Description
:
"Stores input as an IPFS block"
,
Help
:
`ipfs block put is a plumbing command for storing raw ipfs blocks.
It reads from stdin, and <key> is a base58 encoded multihash.`
,
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Stores input as an IPFS block"
,
ShortDescription
:
`
ipfs block put is a plumbing command for storing raw ipfs blocks.
It reads from stdin, and <key> is a base58 encoded multihash.
`
,
},
Arguments
:
[]
cmds
.
Argument
{
cmds
.
FileArg
(
"data"
,
true
,
false
,
"The data to be stored as an IPFS block"
),
...
...
core/commands2/config.go
View file @
e700b165
...
...
@@ -116,10 +116,13 @@ Set the value of the 'datastore.path' key:
}
var
configShowCmd
=
&
cmds
.
Command
{
Description
:
"Outputs the content of the config file"
,
Help
:
`WARNING: Your private key is stored in the config file, and it will be
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Outputs the content of the config file"
,
ShortDescription
:
`
WARNING: Your private key is stored in the config file, and it will be
included in the output of this command.
`
,
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
filename
,
err
:=
config
.
Filename
(
req
.
Context
()
.
ConfigRoot
)
...
...
@@ -132,10 +135,13 @@ included in the output of this command.
}
var
configEditCmd
=
&
cmds
.
Command
{
Description
:
"Opens the config file for editing in $EDITOR"
,
Help
:
`To use 'ipfs config edit', you must have the $EDITOR environment
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Opens the config file for editing in $EDITOR"
,
ShortDescription
:
`
To use 'ipfs config edit', you must have the $EDITOR environment
variable set to your preferred text editor.
`
,
},
Run
:
func
(
req
cmds
.
Request
)
(
interface
{},
error
)
{
filename
,
err
:=
config
.
Filename
(
req
.
Context
()
.
ConfigRoot
)
...
...
core/commands2/diag.go
View file @
e700b165
...
...
@@ -29,7 +29,9 @@ type DiagnosticOutput struct {
}
var
diagCmd
=
&
cmds
.
Command
{
Description
:
"Generates diagnostic reports"
,
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Generates diagnostic reports"
,
},
Subcommands
:
map
[
string
]
*
cmds
.
Command
{
"net"
:
diagNetCmd
,
...
...
core/commands2/pin.go
View file @
e700b165
...
...
@@ -10,7 +10,9 @@ import (
)
var
pinCmd
=
&
cmds
.
Command
{
Description
:
"Keeps objects stored locally"
,
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Keeps objects stored locally"
,
},
Subcommands
:
map
[
string
]
*
cmds
.
Command
{
"add"
:
addPinCmd
,
...
...
core/commands2/publish.go
View file @
e700b165
...
...
@@ -14,8 +14,15 @@ import (
var
errNotOnline
=
errors
.
New
(
"This command must be run in online mode. Try running 'ipfs daemon' first."
)
var
publishCmd
=
&
cmds
.
Command
{
Description
:
"Publish an object to IPNS"
,
Help
:
`IPNS is a PKI namespace, where names are the hashes of public keys, and
Helptext
:
cmds
.
HelpText
{
Tagline
:
"Publish an object to IPNS"
,
ShortDescription
:
`
IPNS is a PKI namespace, where names are the hashes of public keys, and
the private key enables publishing new (signed) values. In publish, the
default value of <name> is your own identity public key.
`
,
LongDescription
:
`
IPNS is a PKI namespace, where names are the hashes of public keys, and
the private key enables publishing new (signed) values. In publish, the
default value of <name> is your own identity public key.
...
...
@@ -30,8 +37,8 @@ Publish a <ref> to another public key:
> ipfs name publish QmbCMUZw6JFeZ7Wp9jkzbye3Fzp2GGcPgC3nmeUjfVF87n QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy
published name QmbCMUZw6JFeZ7Wp9jkzbye3Fzp2GGcPgC3nmeUjfVF87n to QmatmE9msSfkKxoffpHwNLNKgwZG8eT9Bud6YoPab52vpy
`
,
},
Arguments
:
[]
cmds
.
Argument
{
cmds
.
StringArg
(
"name"
,
false
,
false
,
"The IPNS name to publish to. Defaults to your node's peerID"
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment