Note: This commit is technically broken. However, I need to make a bunch of
cmds changes to make this work and I'd rather not bundle both changes into a
single commit.
License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
With verbose flag:
* remove EnableStdin() flags on all StringArg,
* remove all unneeded parsing code for StringArg, and print an
* informative message if `ipfs` begins reading from a CharDevice,
* remove broken go tests for EnableStdin cli parsing, and add some
* trivial test cases for reading FileArg from stdin,
* add a panic to prevent EnableStdin from being set on
* StringArg in the future.
Resolves: #2877, #2870
License: MIT
Signed-off-by: Thomas Gardner <tmg@fastmail.com>
* reduces help indent from 4 to 2 spaces
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* reduces horz/vert space taken by "ipfs" cmd
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* show subcommands on shorthelp
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Drops colons at the end of cmd headings.
This makes command headings consistent with the output of 'ipfs', which
does not include colons.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* more consistent output between short-/long-help
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Puts DESCRIPTION before SUBCOMMANDS.
Users likely want to understand what a command does before worrying
about its subcommands.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Keeps ipfs cmd from outputting its subcmds twice.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Removes redundant synopsis from "file"
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Removes extra whitespace from longhelp
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Consistent spacing whether SUBCMDS or not.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Removes redundant SUBCMD output from ipfs object.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Removes redundant synopsis from "name"
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Newline after Description only if it exists.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Removes redundant synopsis from "bootstrap"
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Removes redundant synopsis from "swarm"
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Removes trailing newline in ping help.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Prints shorthelp on parse error.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* tiny comment fixes
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* updates README usage
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Don't include extra whitespace if no .MoreHelp
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* description improvements
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Hides the obscure 'file' subcommand.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Splits 'ipfs daemon' into Short and Long help.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Removes redundant synopsis from "config"
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Wraps lines to keep from going over 80.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* specify repo separately
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* s/structure/hierarchy
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* missing .
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Removes trailing colon from 'usage' test.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Updates sharness test error messages.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Removes trailing colon from 'usage' test.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Updates add-symlink to use /bin/sh.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Removes "hierarchy".
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
* Updates "ipfs ping" synopsis.
* Updates t0040 with latest wording.
* Removes unnecessary daemon setup.
License: MIT
Signed-off-by: Stephen Whitmore <noffle@ipfs.io>
For the rest of the packages in util, move them to thirdparty
and update the references. util is gone!
License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
We now consider debugerrors harmful: we've run into cases where
debugerror.Wrap() hid valuable error information (err == io.EOF?).
I've removed them from the main code, but left them in some tests.
Go errors are lacking, but unfortunately, this isn't the solution.
It is possible that debugerros.New or debugerrors.Errorf should
remain still (i.e. only remove debugerrors.Wrap) but we don't use
these errors often enough to keep.
⚠️ this commit makes your current configs unusable, as the
default bootstrap peers. You may need to edit your config.
Go from:
```js
Bootstrap: [
{
"Address": "/ip4/104.131.131.82/tcp/4001",
"PeerID": "QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"
}
]
```
To:
```js
Bootstrap: [
"/ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ"
]
```
The pkg.Interface style is modeled after heap.Interface. Generally, I
find it helpful for interfaces that have many implementations. It
provides clear distinction between the generic interface and the |n|
implementations that implement it (which may be interface types
themselves).
For clients who cannot keep the repo name, one can imagine that the most
likely rename is `ipfsrepo`. In that case, `ipfsrepo.Interface` remains
meaningful.
This is low-pri so it doesn't matter than much. But for the record, the
repo.Interface feels appropriate in this use-case.
this commit:
* moves parsing of bootstrap peers into config
* moves location of bootstrap addrs into core/commands
* refactor `*BootstrapPeer -> BootstrapPeer