Merge pull request #2911 from ipfs/feature/ifps-capitalize

docs: decapitalize IPFS where possible
This commit is contained in:
Jeromy Johnson 2016-11-02 13:20:51 -07:00 committed by GitHub
commit 437cc7fa78
47 changed files with 84 additions and 84 deletions

View File

@ -1,4 +1,4 @@
// package blocks contains the lowest level of ipfs data structures,
// package blocks contains the lowest level of IPFS data structures,
// the raw block with a checksum.
package blocks

View File

@ -56,7 +56,7 @@ var daemonCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Run a network-connected IPFS node.",
ShortDescription: `
'ipfs daemon' runs a persistent IPFS daemon that can serve commands
'ipfs daemon' runs a persistent ipfs daemon that can serve commands
over the network. Most applications that use IPFS will do so by
communicating with a daemon over the HTTP API. While the daemon is
running, calls to 'ipfs' commands will be sent over the network to
@ -87,7 +87,7 @@ make sure to protect the port as you would other services or database
HTTP Headers
IPFS supports passing arbitrary headers to the API and Gateway. You can
ipfs supports passing arbitrary headers to the API and Gateway. You can
do this by setting headers on the API.HTTPHeaders and Gateway.HTTPHeaders
keys:
@ -134,7 +134,7 @@ This will later be transitioned into a config option once it gets out of the
DEPRECATION NOTICE
Previously, IPFS used an environment variable as seen below:
Previously, ipfs used an environment variable as seen below:
export API_ORIGIN="http://localhost:8888/"
@ -145,7 +145,7 @@ Headers.
},
Options: []cmds.Option{
cmds.BoolOption(initOptionKwd, "Initialize IPFS with default settings if not already initialized").Default(false),
cmds.BoolOption(initOptionKwd, "Initialize ipfs with default settings if not already initialized").Default(false),
cmds.StringOption(routingOptionKwd, "Overrides the routing option").Default("dht"),
cmds.BoolOption(mountKwd, "Mounts IPFS to the filesystem").Default(false),
cmds.BoolOption(writableKwd, "Enable writing objects (with POST, PUT and DELETE)").Default(false),
@ -226,7 +226,7 @@ func daemonFunc(req cmds.Request, res cmds.Response) {
if initialize {
// now, FileExists is our best method of detecting whether IPFS is
// now, FileExists is our best method of detecting whether ipfs is
// configured. Consider moving this into a config helper method
// `IsInitialized` where the quality of the signal can be improved over
// time, and many call-sites can benefit.

View File

@ -23,9 +23,9 @@ const (
var initCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Initializes IPFS config file.",
Tagline: "Initializes ipfs config file.",
ShortDescription: `
Initializes IPFS configuration files and generates a new keypair.
Initializes ipfs configuration files and generates a new keypair.
ipfs uses a repository in the local file system. By default, the repo is
located at ~/.ipfs. To change the repo location, set the $IPFS_PATH
@ -112,7 +112,7 @@ func initWithDefaults(out io.Writer, repoRoot string) error {
}
func doInit(out io.Writer, repoRoot string, empty bool, nBitsForKeypair int, conf *config.Config) error {
if _, err := fmt.Fprintf(out, "initializing ipfs node at %s\n", repoRoot); err != nil {
if _, err := fmt.Fprintf(out, "initializing IPFS node at %s\n", repoRoot); err != nil {
return err
}

View File

@ -381,7 +381,7 @@ func commandDetails(path []string, root *cmds.Command) (*cmdDetails, error) {
}
// commandShouldRunOnDaemon determines, from commmand details, whether a
// command ought to be executed on an IPFS daemon.
// command ought to be executed on an ipfs daemon.
//
// It returns a client if the command should be executed on a daemon and nil if
// it should be executed on a client. It returns an error if the command must

View File

@ -13,7 +13,7 @@ import (
var ActiveReqsCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "List commands run on this ipfs node.",
Tagline: "List commands run on this IPFS node.",
ShortDescription: `
Lists running and recently run commands.
`,

View File

@ -66,7 +66,7 @@ You can now refer to the added file in a gateway, like so:
},
Arguments: []cmds.Argument{
cmds.FileArg("path", true, true, "The path to a file to be added to IPFS.").EnableRecursive().EnableStdin(),
cmds.FileArg("path", true, true, "The path to a file to be added to ipfs.").EnableRecursive().EnableStdin(),
},
Options: []cmds.Option{
cmds.OptionRecursivePath, // a builtin option that allows recursive paths (-r, --recursive)

View File

@ -29,7 +29,7 @@ var BlockCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Interact with raw IPFS blocks.",
ShortDescription: `
'ipfs block' is a plumbing command used to manipulate raw ipfs blocks.
'ipfs block' is a plumbing command used to manipulate raw IPFS blocks.
Reads from stdin or writes to stdout, and <key> is a base58 encoded
multihash.
`,
@ -48,7 +48,7 @@ var blockStatCmd = &cmds.Command{
Tagline: "Print information of a raw IPFS block.",
ShortDescription: `
'ipfs block stat' is a plumbing command for retrieving information
on raw ipfs blocks. It outputs the following to stdout:
on raw IPFS blocks. It outputs the following to stdout:
Key - the base58 encoded multihash
Size - the size of the block in bytes
@ -84,7 +84,7 @@ var blockGetCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Get a raw IPFS block.",
ShortDescription: `
'ipfs block get' is a plumbing command for retrieving raw ipfs blocks.
'ipfs block get' is a plumbing command for retrieving raw IPFS blocks.
It outputs to stdout, and <key> is a base58 encoded multihash.
`,
},
@ -107,7 +107,7 @@ var blockPutCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Store input as an IPFS block.",
ShortDescription: `
'ipfs block put' is a plumbing command for storing raw ipfs blocks.
'ipfs block put' is a plumbing command for storing raw IPFS blocks.
It reads from stdin, and <key> is a base58 encoded multihash.
`,
},

View File

@ -1,4 +1,4 @@
// Package commands implements the IPFS command interface
// Package commands implements the ipfs command interface
//
// Using github.com/ipfs/go-ipfs/commands to define the command line and HTTP
// APIs. This is the interface available to folks using IPFS from outside of

View File

@ -26,10 +26,10 @@ type ConfigField struct {
var ConfigCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Get and set IPFS config values.",
Tagline: "Get and set ipfs config values.",
ShortDescription: `
'ipfs config' controls configuration variables. It works like 'git config'.
The configuration values are stored in a config file inside your IPFS
The configuration values are stored in a config file inside your ipfs
repository.`,
LongDescription: `
'ipfs config' controls configuration variables. It works

View File

@ -40,7 +40,7 @@ type IdOutput struct {
var IDCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Show IPFS Node ID info.",
Tagline: "Show ipfs node id info.",
ShortDescription: `
Prints out information about the specified peer.
If no peer is specified, prints out information for local peers.

View File

@ -9,7 +9,7 @@ import (
var MountCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Mount IPFS to the filesystem (disabled).",
Tagline: "Mounts ipfs to the filesystem (disabled).",
ShortDescription: `
This version of ipfs is compiled without fuse support, which is required
for mounting. If you'd like to be able to mount, please use a version of

View File

@ -15,10 +15,10 @@ import (
var MountCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Mount IPFS to the filesystem (read-only).",
Tagline: "Mounts IPFS to the filesystem (read-only).",
ShortDescription: `
Mount ipfs at a read-only mountpoint on the OS (default: /ipfs and /ipns).
All ipfs objects will be accessible under that directory. Note that the
Mount IPFS at a read-only mountpoint on the OS (default: /ipfs and /ipns).
All IPFS objects will be accessible under that directory. Note that the
root will not be listable, as it is virtual. Access known paths directly.
You may have to create /ipfs and /ipns before using 'ipfs mount':
@ -29,9 +29,9 @@ You may have to create /ipfs and /ipns before using 'ipfs mount':
> ipfs mount
`,
LongDescription: `
Mount ipfs at a read-only mountpoint on the OS. The default, /ipfs and /ipns,
Mount IPFS at a read-only mountpoint on the OS. The default, /ipfs and /ipns,
are set in the configutation file, but can be overriden by the options.
All ipfs objects will be accessible under this directory. Note that the
All IPFS objects will be accessible under this directory. Note that the
root will not be listable, as it is virtual. Access known paths directly.
You may have to create /ipfs and /ipns before using 'ipfs mount':

View File

@ -21,10 +21,10 @@ var ObjectDiffCmd = &cmds.Command{
Tagline: "Display the diff between two ipfs objects.",
ShortDescription: `
'ipfs object diff' is a command used to show the differences between
two ipfs objects.`,
two IPFS objects.`,
LongDescription: `
'ipfs object diff' is a command used to show the differences between
two ipfs objects.
two IPFS objects.
Example:

View File

@ -44,7 +44,7 @@ type Object struct {
var ObjectCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Interact with ipfs objects.",
Tagline: "Interact with IPFS objects.",
ShortDescription: `
'ipfs object' is a plumbing command used to manipulate DAG objects
directly.`,

View File

@ -115,9 +115,9 @@ the limit will not be respected by the network.
var patchSetDataCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Set the data field of an ipfs object.",
Tagline: "Set the data field of an IPFS object.",
ShortDescription: `
Set the data of an ipfs object from stdin or with the contents of a file.
Set the data of an IPFS object from stdin or with the contents of a file.
Example:

View File

@ -47,7 +47,7 @@ Publish an <ipfs-path> to another public key (not implemented):
},
Arguments: []cmds.Argument{
cmds.StringArg("ipfs-path", true, false, "IPFS path of the object to be published.").EnableStdin(),
cmds.StringArg("ipfs-path", true, false, "ipfs path of the object to be published.").EnableStdin(),
},
Options: []cmds.Option{
cmds.BoolOption("resolve", "Resolve given path before publishing.").Default(true),

View File

@ -24,7 +24,7 @@ type RepoVersion struct {
var RepoCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Interact with the IPFS repo.",
Tagline: "Manipulate the IPFS repo.",
ShortDescription: `
'ipfs repo' is a plumbing command used to manipulate the repo.
`,

View File

@ -25,9 +25,9 @@ var Root = &cmds.Command{
Subcommands: `
BASIC COMMANDS
init Initialize ipfs local configuration
add <path> Add a file to ipfs
cat <ref> Show ipfs object data
get <ref> Download ipfs objects
add <path> Add a file to IPFS
cat <ref> Show IPFS object data
get <ref> Download IPFS objects
ls <ref> List links from an object
refs <ref> List hashes of links from an object
@ -38,7 +38,7 @@ DATA STRUCTURE COMMANDS
ADVANCED COMMANDS
daemon Start a long-running daemon process
mount Mount an ipfs read-only mountpoint
mount Mount an IPFS read-only mountpoint
resolve Resolve any type of name
name Publish or resolve IPNS names
dns Resolve DNS links
@ -46,7 +46,7 @@ ADVANCED COMMANDS
repo Manipulate the IPFS repository
NETWORK COMMANDS
id Show info about ipfs peers
id Show info about IPFS peers
bootstrap Add or remove bootstrap peers
swarm Manage connections to the p2p network
dht Query the DHT for values or peers

View File

@ -18,12 +18,12 @@ import (
var StatsCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Query ipfs statistics.",
Tagline: "Query IPFS statistics.",
ShortDescription: `'ipfs stats' is a set of commands to help look at statistics
for your ipfs node.
for your IPFS node.
`,
LongDescription: `'ipfs stats' is a set of commands to help look at statistics
for your ipfs node.`,
for your IPFS node.`,
},
Subcommands: map[string]*cmds.Command{

View File

@ -209,7 +209,7 @@ var swarmConnectCmd = &cmds.Command{
ShortDescription: `
'ipfs swarm connect' opens a new direct connection to a peer address.
The address format is an ipfs multiaddr:
The address format is an IPFS multiaddr:
ipfs swarm connect /ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ
`,
@ -274,7 +274,7 @@ var swarmDisconnectCmd = &cmds.Command{
Tagline: "Close connection to a given address.",
ShortDescription: `
'ipfs swarm disconnect' closes a connection to a peer address. The address
format is an ipfs multiaddr:
format is an IPFS multiaddr:
ipfs swarm disconnect /ip4/104.131.131.82/tcp/4001/ipfs/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ

View File

@ -14,7 +14,7 @@ import (
var TarCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Interact with tar files in IPFS.",
Tagline: "Utility functions for tar files in ipfs.",
},
Subcommands: map[string]*cmds.Command{
@ -80,7 +80,7 @@ var tarCatCmd = &cmds.Command{
},
Arguments: []cmds.Argument{
cmds.StringArg("path", true, false, "IPFS path of archive to export.").EnableStdin(),
cmds.StringArg("path", true, false, "ipfs path of archive to export.").EnableStdin(),
},
Run: func(req cmds.Request, res cmds.Response) {
nd, err := req.InvocContext().GetNode()

View File

@ -11,9 +11,9 @@ func TestParseTourTemplate(t *testing.T) {
topic := &tour.Topic{
ID: "42",
Content: tour.Content{
Title: "IPFS CLI test files",
Title: "ipfs CLI test files",
Text: `
Welcome to the IPFS test files
Welcome to the ipfs test files
This is where we test our beautiful command line interfaces
`,
},

View File

@ -4,15 +4,15 @@ import cmds "github.com/ipfs/go-ipfs/commands"
var UnixFSCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Interact with ipfs objects representing Unix filesystems.",
Tagline: "Interact with IPFS objects representing Unix filesystems.",
ShortDescription: `
'ipfs file' provides a familiar interface to file systems represented
by IPFS objects, which hides IPFS implementation details like layout
by IPFS objects, which hides ipfs implementation details like layout
objects (e.g. fanout and chunking).
`,
LongDescription: `
'ipfs file' provides a familiar interface to file systems represented
by IPFS objects, which hides IPFS implementation details like layout
by IPFS objects, which hides ipfs implementation details like layout
objects (e.g. fanout and chunking).
`,
},

View File

@ -445,10 +445,10 @@ func (n *IpfsNode) loadID() error {
cid := cfg.Identity.PeerID
if cid == "" {
return errors.New("Identity was not set in config (was ipfs init run?)")
return errors.New("identity was not set in config (was 'ipfs init' run?)")
}
if len(cid) == 0 {
return errors.New("No peer ID in config! (was ipfs init run?)")
return errors.New("no peer ID in config! (was 'ipfs init' run?)")
}
n.Identity = peer.ID(b58.Decode(cid))

View File

@ -357,7 +357,7 @@ func (i *gatewayHandler) putHandler(w http.ResponseWriter, r *http.Request) {
rootPath, err := path.ParsePath(r.URL.Path)
if err != nil {
webError(w, "putHandler: ipfs path not valid", err, http.StatusBadRequest)
webError(w, "putHandler: IPFS path not valid", err, http.StatusBadRequest)
return
}

View File

@ -53,7 +53,7 @@ func Resolve(ctx context.Context, nsys namesys.NameSystem, r *path.Resolver, p p
}
}
// ok, we have an ipfs path now (or what we'll treat as one)
// ok, we have an IPFS path now (or what we'll treat as one)
return r.ResolvePath(ctx, p)
}

View File

@ -13,7 +13,7 @@ Sections:
IPFS uses a set of type value that is useful to enumerate up front:
- `<ipfs-path>` is unix-style path, beginning with `/ipfs/<hash>/...` or `/ipns/<hash>/...` or `/ipns/<domain>/...`.
- `<hash>` is a base58 encoded [multihash](https://github.com/jbenet/multihash) (there are [many implementations](https://github.com/jbenet/multihash#implementations)). Usually the hash of an ipfs object (or merkle dag node).
- `<hash>` is a base58 encoded [multihash](https://github.com/jbenet/multihash) (there are [many implementations](https://github.com/jbenet/multihash#implementations)). Usually the hash of an IPFS object (or merkle dag node).
A note on streams: IPFS is a streaming protocol. Everything about it can be streamed. When importing files, API requests should aim to stream the data in, and handle back-pressure correctly, so that the IPFS node can handle it sequentially without too much memory pressure. (If using HTTP, this is typically handled for you by writes to the request body blocking.)

View File

@ -1,4 +1,4 @@
// package bitswap implements the IPFS Exchange interface with the BitSwap
// package bitswap implements the IPFS exchange interface with the BitSwap
// bilateral exchange protocol.
package bitswap
@ -68,7 +68,7 @@ func New(parent context.Context, p peer.ID, network bsnet.BitSwapNetwork,
// important to use provided parent context (since it may include important
// loggable data). It's probably not a good idea to allow bitswap to be
// coupled to the concerns of the IPFS daemon in this way.
// coupled to the concerns of the ipfs daemon in this way.
//
// FIXME(btc) Now that bitswap manages itself using a process, it probably
// shouldn't accept a context anymore. Clients should probably use Close()

View File

@ -1,4 +1,4 @@
// package exchange defines the IPFS Exchange interface
// package exchange defines the IPFS exchange interface
package exchange
import (

View File

@ -8,7 +8,7 @@ import (
mount "github.com/ipfs/go-ipfs/fuse/mount"
)
// Mount mounts ipfs at a given location, and returns a mount.Mount instance.
// Mount mounts IPFS at a given location, and returns a mount.Mount instance.
func Mount(ipfs *core.IpfsNode, mountpoint string) (mount.Mount, error) {
cfg, err := ipfs.Repo.Config()
if err != nil {

View File

@ -25,7 +25,7 @@ import (
var log = logging.Logger("fuse/ipfs")
// FileSystem is the readonly Ipfs Fuse Filesystem.
// FileSystem is the readonly IPFS Fuse Filesystem.
type FileSystem struct {
Ipfs *core.IpfsNode
}

View File

@ -1,4 +1,4 @@
// package importer implements utilities used to create ipfs DAGs from files
// package importer implements utilities used to create IPFS DAGs from files
// and readers
package importer

View File

@ -1,4 +1,4 @@
// package merkledag implements the ipfs Merkle DAG datastructures.
// package merkledag implements the IPFS Merkle DAG datastructures.
package merkledag
import (

View File

@ -1,4 +1,4 @@
// package mfs implements an in memory model of a mutable ipfs filesystem.
// package mfs implements an in memory model of a mutable IPFS filesystem.
//
// It consists of four main structs:
// 1) The Filesystem

View File

@ -14,11 +14,11 @@ import (
// mpns (a multi-protocol NameSystem) implements generic IPFS naming.
//
// Uses several Resolvers:
// (a) ipfs routing naming: SFS-like PKI names.
// (a) IPFS routing naming: SFS-like PKI names.
// (b) dns domains: resolves using links in DNS TXT records
// (c) proquints: interprets string as the raw byte data.
//
// It can only publish to: (a) ipfs routing naming.
// It can only publish to: (a) IPFS routing naming.
//
type mpns struct {
resolvers map[string]resolver

View File

@ -9,7 +9,7 @@ import (
)
// ErrBadPath is returned when a given path is incorrectly formatted
var ErrBadPath = errors.New("invalid ipfs ref path")
var ErrBadPath = errors.New("invalid 'ipfs ref' path")
// TODO: debate making this a private struct wrapped in a public interface
// would allow us to control creation, and cache segments.

View File

@ -8,7 +8,7 @@ import (
)
// DefaultBootstrapAddresses are the hardcoded bootstrap addresses
// for ipfs. they are nodes run by the ipfs team. docs on these later.
// for IPFS. they are nodes run by the IPFS team. docs on these later.
// As with all p2p networks, bootstrap is an important security concern.
//
// NOTE: This is here -- and not inside cmd/ipfs/init.go -- because of an

View File

@ -15,7 +15,7 @@ import (
var log = logging.Logger("config")
// Config is used to load IPFS config files.
// Config is used to load ipfs config files.
type Config struct {
Identity Identity // local node's peer identity
Datastore Datastore // local node's storage

View File

@ -1,6 +1,6 @@
package config
// Tour stores the ipfs tour read-list and resume point
// Tour stores the 'ipfs tour' read-list and resume point
type Tour struct {
Last string // last tour topic read
// Done []string // all topics done so far

View File

@ -55,7 +55,7 @@ type NoRepoError struct {
var _ error = NoRepoError{}
func (err NoRepoError) Error() string {
return fmt.Sprintf("no ipfs repo found in %s.\nplease run: ipfs init", err.Path)
return fmt.Sprintf("no IPFS repo found in %s.\nplease run: 'ipfs init'", err.Path)
}
const apiFile = "api"

View File

@ -196,7 +196,7 @@ func (tr *tarReader) Read(b []byte) (int, error) {
func ExportTar(ctx context.Context, root *dag.ProtoNode, ds dag.DAGService) (io.Reader, error) {
if string(root.Data()) != "ipfs/tar" {
return nil, errors.New("not an ipfs tarchive")
return nil, errors.New("not an IPFS tarchive")
}
return &tarReader{
links: root.Links(),

View File

@ -16,7 +16,7 @@ import (
)
var (
debug = flag.Bool("debug", false, "direct IPFS output to console")
debug = flag.Bool("debug", false, "direct ipfs output to console")
online = flag.Bool("online", false, "run the benchmarks with a running daemon")
)

View File

@ -45,8 +45,8 @@ test_expect_success "ipfs cat fails" '
'
test_expect_success "ipfs cat no repo message looks good" '
echo "Error: no ipfs repo found in $IPFS_PATH." > cat_fail_exp &&
echo "please run: ipfs init" >> cat_fail_exp &&
echo "Error: no IPFS repo found in $IPFS_PATH." > cat_fail_exp &&
echo "please run: 'ipfs init'" >> cat_fail_exp &&
test_path_cmp cat_fail_exp cat_fail_out
'
@ -80,7 +80,7 @@ test_expect_success "ipfs peer id looks good" '
test_expect_success "ipfs init output looks good" '
STARTFILE="ipfs cat /ipfs/$HASH_WELCOME_DOCS/readme" &&
echo "initializing ipfs node at $IPFS_PATH" >expected &&
echo "initializing IPFS node at $IPFS_PATH" >expected &&
echo "generating $BITS-bit RSA keypair...done" >>expected &&
echo "peer identity: $PEERID" >>expected &&
echo "to get started, enter:" >>expected &&
@ -107,7 +107,7 @@ test_expect_success "ipfs peer id looks good" '
'
test_expect_success "'ipfs init --empty-repo' output looks good" '
echo "initializing ipfs node at $IPFS_PATH" >expected &&
echo "initializing IPFS node at $IPFS_PATH" >expected &&
echo "generating $BITS-bit RSA keypair...done" >>expected &&
echo "peer identity: $PEERID" >>expected &&
test_cmp expected actual_init

View File

@ -107,7 +107,7 @@ test_get_cmd() {
'
test_expect_success "ipfs get ../.. should fail" '
echo "Error: invalid ipfs ref path" >expected &&
echo "Error: invalid 'ipfs ref' path" >expected &&
test_must_fail ipfs get ../.. 2>actual &&
test_cmp expected actual
'

View File

@ -12,8 +12,8 @@ import (
var log = logging.Logger("ipfsaddr")
// ErrInvalidAddr signals an address is not a valid ipfs address.
var ErrInvalidAddr = errors.New("invalid ipfs address")
// ErrInvalidAddr signals an address is not a valid IPFS address.
var ErrInvalidAddr = errors.New("invalid IPFS address")
type IPFSAddr interface {
ID() peer.ID
@ -83,7 +83,7 @@ func ParseMultiaddr(m ma.Multiaddr) (a IPFSAddr, err error) {
return nil, ErrInvalidAddr
}
// make sure it's an ipfs addr
// make sure it's an IPFS addr
parts := ma.Split(m)
if len(parts) < 1 {
return nil, ErrInvalidAddr
@ -93,7 +93,7 @@ func ParseMultiaddr(m ma.Multiaddr) (a IPFSAddr, err error) {
return nil, ErrInvalidAddr
}
// make sure ipfs id parses as a peer.ID
// make sure 'ipfs id' parses as a peer.ID
peerIdParts := path.SplitList(ipfspart.String())
peerIdStr := peerIdParts[len(peerIdParts)-1]
id, err := peer.IDB58Decode(peerIdStr)

View File

@ -182,11 +182,11 @@ var NodeBasicsInit = Content{
// TODO touch on PKI
//
// This is somewhat relevant at ipfs init since the generated key pair is the
// This is somewhat relevant at 'ipfs init' since the generated key pair is the
// basis for the node's identity in the network. A cursory nod may be
// sufficient at that stage, and goes a long way in explaining init's raison
// d'être.
// NB: user is introduced to ipfs init before ipfs add.
// NB: user is introduced to 'ipfs init' before 'ipfs add'.
Text: `
`,
}

View File

@ -1,4 +1,4 @@
// Package format implements a data format for files in the ipfs filesystem It
// Package format implements a data format for files in the IPFS filesystem It
// is not the only format in ipfs, but it is the one that the filesystem
// assumes
package unixfs