Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
G
go-ipfs
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
jihao
go-ipfs
Commits
2b8ef917
提交
2b8ef917
authored
11月 08, 2014
作者:
Matt Bell
提交者:
Juan Batiz-Benet
11月 14, 2014
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cmd/ipfs2: Added descriptions for 'init', 'tour'
上级
c2615d34
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
25 行增加
和
28 行删除
+25
-28
init.go
cmd/ipfs2/init.go
+12
-9
tour.go
cmd/ipfs2/tour.go
+13
-19
没有找到文件。
cmd/ipfs2/init.go
浏览文件 @
2b8ef917
...
...
@@ -16,17 +16,20 @@ import (
)
var
initCmd
=
&
cmds
.
Command
{
Description
:
"Initializes IPFS config file"
,
Help
:
`Initializes IPFS configuration files and generates a new keypair.
`
,
Options
:
[]
cmds
.
Option
{
cmds
.
Option
{[]
string
{
"bits"
,
"b"
},
cmds
.
Int
},
cmds
.
Option
{[]
string
{
"passphrase"
,
"p"
},
cmds
.
String
},
cmds
.
Option
{[]
string
{
"force"
,
"f"
},
cmds
.
Bool
},
cmds
.
Option
{[]
string
{
"datastore"
,
"d"
},
cmds
.
String
},
cmds
.
Option
{[]
string
{
"bits"
,
"b"
},
cmds
.
Int
,
"Number of bits to use in the generated RSA private key (defaults to 4096)"
},
cmds
.
Option
{[]
string
{
"passphrase"
,
"p"
},
cmds
.
String
,
"Passphrase for encrypting the private key"
},
cmds
.
Option
{[]
string
{
"force"
,
"f"
},
cmds
.
Bool
,
"Overwrite existing config (if it exists)"
},
cmds
.
Option
{[]
string
{
"datastore"
,
"d"
},
cmds
.
String
,
"Location for the IPFS data store"
},
},
Help
:
`ipfs init
Initializes ipfs configuration files and generates a
new keypair.
`
,
Run
:
func
(
res
cmds
.
Response
,
req
cmds
.
Request
)
{
arg
,
found
:=
req
.
Option
(
"d"
)
...
...
cmd/ipfs2/tour.go
浏览文件 @
2b8ef917
...
...
@@ -13,27 +13,18 @@ import (
)
var
cmdTour
=
&
cmds
.
Command
{
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"number"
,
cmds
.
ArgString
,
false
,
false
},
},
// TODO UsageLine: "tour [<number>]",
// TODO Short: "Take the IPFS Tour.",
Help
:
`ipfs tour - Take the IPFS Tour.
ipfs tour [<number>] - Show tour topic. Default to current.
ipfs tour next - Show the next tour topic.
ipfs tour list - Show a list of topics.
ipfs tour restart - Restart the tour.
This is a tour that takes you through various IPFS concepts,
Description
:
"An introduction to IPFS"
,
Help
:
`This is a tour that takes you through various IPFS concepts,
features, and tools to make sure you get up to speed with
IPFS very quickly. To start, run:
ipfs tour
`
,
Arguments
:
[]
cmds
.
Argument
{
cmds
.
Argument
{
"number"
,
cmds
.
ArgString
,
false
,
false
,
"The number of the topic you would like to tour"
},
},
Subcommands
:
map
[
string
]
*
cmds
.
Command
{
"list"
:
cmdIpfsTourList
,
"next"
:
cmdIpfsTourNext
,
...
...
@@ -65,7 +56,8 @@ IPFS very quickly. To start, run:
}
var
cmdIpfsTourNext
=
&
cmds
.
Command
{
Help
:
"Show the next IPFS Tour topic."
,
Description
:
"Show the next IPFS Tour topic"
,
Run
:
func
(
res
cmds
.
Response
,
req
cmds
.
Request
)
{
var
w
bytes
.
Buffer
cfg
:=
req
.
Context
()
.
Config
...
...
@@ -92,7 +84,8 @@ var cmdIpfsTourNext = &cmds.Command{
}
var
cmdIpfsTourRestart
=
&
cmds
.
Command
{
Help
:
"Restart the IPFS Tour."
,
Description
:
"Restart the IPFS Tour"
,
Run
:
func
(
res
cmds
.
Response
,
req
cmds
.
Request
)
{
path
:=
req
.
Context
()
.
ConfigRoot
cfg
:=
req
.
Context
()
.
Config
...
...
@@ -106,7 +99,8 @@ var cmdIpfsTourRestart = &cmds.Command{
}
var
cmdIpfsTourList
=
&
cmds
.
Command
{
Help
:
"Show a list of IPFS Tour topics."
,
Description
:
"Show a list of IPFS Tour topics"
,
Run
:
func
(
res
cmds
.
Response
,
req
cmds
.
Request
)
{
var
w
bytes
.
Buffer
tourListCmd
(
&
w
,
req
.
Context
()
.
Config
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论