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
b6a59c90
Commit
b6a59c90
authored
Oct 02, 2014
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add flag for ipfs mountpoint
parent
aa79f385
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
cmd/ipfs/mount_unix.go
cmd/ipfs/mount_unix.go
+3
-2
No files found.
cmd/ipfs/mount_unix.go
View file @
b6a59c90
...
...
@@ -32,6 +32,7 @@ var cmdIpfsMount = &commander.Command{
func
init
()
{
cmdIpfsMount
.
Flag
.
String
(
"n"
,
""
,
"specify a mountpoint for ipns"
)
cmdIpfsMount
.
Flag
.
String
(
"f"
,
"/ipfs"
,
"specify a mountpoint for ipfs"
)
}
func
mountCmd
(
c
*
commander
.
Command
,
inp
[]
string
)
error
{
...
...
@@ -69,12 +70,12 @@ func mountCmd(c *commander.Command, inp []string) error {
go
dl
.
Listen
()
defer
dl
.
Close
()
mp
:=
inp
[
0
]
mp
:=
c
.
Flag
.
Lookup
(
"f"
)
.
Value
.
Get
()
.
(
string
)
fmt
.
Printf
(
"Mounting at %s
\n
"
,
mp
)
var
ipnsDone
chan
struct
{}
ns
,
ok
:=
c
.
Flag
.
Lookup
(
"n"
)
.
Value
.
Get
()
.
(
string
)
if
ok
{
if
ok
&&
ns
!=
""
{
ipnsDone
=
make
(
chan
struct
{})
go
func
()
{
err
=
ipns
.
Mount
(
n
,
ns
,
mp
)
...
...
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