Conversation
warningRebasing this on top of master once #262 lands. |
|
okay, this should be ready. cc @mappum @maybebtc |
|
thanks for the git ninja work. very much appreciated. will have a look |
|
This branch's |
|
Yes, we definitely want help text printed out. |
cmd/ipfs2/daemon.go
Outdated
There was a problem hiding this comment.
Does this assignment have a side-effect?
Read further and realized the context is passed to the handler with the node in tow.
Is there a plan for removing IPFS-specific concepts from the commands.Context? Doesn't seem like this library could be extracted otherwise.
There was a problem hiding this comment.
Yep, that's the reason I kept all the IPFS-specific stuff contained in the Context, but I'm not sure exactly how we should do it. Maybe I should just change it to a map[string]interface{}? Anyway, I'm not too worried about making the library vendorable right away since making it work with IPFS is higher priority.
There was a problem hiding this comment.
Yeah I agree. Let's try to not introduce more ipfs specific things and vendor later
—
Sent from Mailbox
On Tue, Nov 4, 2014 at 3:30 PM, Matt Bell notifications@github.com
wrote:
+func daemonFunc(res cmds.Response, req cmds.Request) {
- ctx := req.Context()
- lk, err := daemon.Lock(ctx.ConfigRoot)
- if err != nil {
res.SetError(fmt.Errorf("Couldn't obtain lock. Is another daemon already running?"), cmds.ErrNormal)return- }
- defer lk.Close()
- node, err := core.NewIpfsNode(ctx.Config, true)
- if err != nil {
res.SetError(err, cmds.ErrNormal)return- }
- ctx.Node = node
Yep, that's the reason I kept all the IPFS-specific stuff contained in the Context, but I'm not sure exactly how we should do it. Maybe I should just change it to amap[string]interface{}? Anyway, I'm not too worried about making the library vendorable right away since making it work with IPFS is higher priority.
Reply to this email directly or view it on GitHub:
https://github.com/jbenet/go-ipfs/pull/263/files#r19845198
|
These argument hints are quite helpful. ipfs ipfs2
|
cmd/ipfs2/main.go
Outdated
|
@mappum @maybebtc how's it going over here? |
|
Other than generating the proper help text, a lot of the commands are done:
|
cmd/ipfs2/main.go
Outdated
There was a problem hiding this comment.
@mappum Is the class of errors returned by Parse designed around user readability?
There was a problem hiding this comment.
Yes, since its input is coming from the user.
core/commands2/ls.go
Outdated
Awesome! I'll CR in a bit. |
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
(The file path is omitted, but since only one object can be added at a time, I think this is ok)
… argument or string argument)
…have any argument definitions
|
Closed in favor of #332 |
gx publish 4.4.24



We split #196 in two parts. this is the second. (#262 is the first). This builds on all the changes to commands/.