Skip to content

Commit

Permalink
Changed so only explicit ipfs cli commands are lowercased
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
  • Loading branch information
RichardLitt committed Oct 19, 2016
1 parent 66ce90a commit 3a3c168
Show file tree
Hide file tree
Showing 38 changed files with 59 additions and 59 deletions.
2 changes: 1 addition & 1 deletion blocks/blocks.go
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 3 additions & 3 deletions cmd/ipfs/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const (

var daemonCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Run a network-connected ipfs node.",
Tagline: "Run a network-connected IPFS node.",
ShortDescription: `
'ipfs daemon' runs a persistent ipfs daemon that can serve commands
over the network. Most applications that use IPFS will do so by
Expand Down Expand Up @@ -133,9 +133,9 @@ Headers.
Options: []cmds.Option{
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(mountKwd, "Mounts IPFS to the filesystem").Default(false),
cmds.BoolOption(writableKwd, "Enable writing objects (with POST, PUT and DELETE)").Default(false),
cmds.StringOption(ipfsMountKwd, "Path to the mountpoint for ipfs (if using --mount). Defaults to config setting."),
cmds.StringOption(ipfsMountKwd, "Path to the mountpoint for IPFS (if using --mount). Defaults to config setting."),
cmds.StringOption(ipnsMountKwd, "Path to the mountpoint for IPNS (if using --mount). Defaults to config setting."),
cmds.BoolOption(unrestrictedApiAccessKwd, "Allow API access to unlisted hashes").Default(false),
cmds.BoolOption(unencryptTransportKwd, "Disable transport encryption (for debugging protocols)").Default(false),
Expand Down
2 changes: 1 addition & 1 deletion cmd/ipfs/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/ipfs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/commands/active.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
`,
Expand Down
4 changes: 2 additions & 2 deletions core/commands/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ multihash.

var blockStatCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Print information of a raw ipfs block.",
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:
Expand Down Expand Up @@ -84,7 +84,7 @@ on raw IPFS blocks. It outputs the following to stdout:

var blockGetCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Get a raw ipfs block.",
Tagline: "Get a raw IPFS block.",
ShortDescription: `
'ipfs block get' is a plumbing command for retrieving raw IPFS blocks.
It outputs to stdout, and <key> is a base58 encoded multihash.
Expand Down
2 changes: 1 addition & 1 deletion core/commands/commands.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/commands/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ repository.`,
LongDescription: `
'ipfs config' controls configuration variables. It works
much like 'git config'. The configuration values are stored in a config
file inside your ipfs repository.
file inside your IPFS repository.
Examples:
Expand Down
8 changes: 4 additions & 4 deletions core/commands/mount_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (

var MountCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Mounts 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).
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.
Expand All @@ -29,7 +29,7 @@ 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
root will not be listable, as it is virtual. Access known paths directly.
Expand Down Expand Up @@ -71,7 +71,7 @@ baz
`,
},
Options: []cmds.Option{
cmds.StringOption("ipfs-path", "f", "The path where ipfs should be mounted."),
cmds.StringOption("ipfs-path", "f", "The path where IPFS should be mounted."),
cmds.StringOption("ipns-path", "n", "The path where IPNS should be mounted."),
},
Run: func(req cmds.Request, res cmds.Response) {
Expand Down
2 changes: 1 addition & 1 deletion core/commands/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type RepoVersion struct {

var RepoCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Manipulate the ipfs repo.",
Tagline: "Manipulate the IPFS repo.",
ShortDescription: `
'ipfs repo' is a plumbing command used to manipulate the repo.
`,
Expand Down
6 changes: 3 additions & 3 deletions core/commands/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var Root = &cmds.Command{
Subcommands: `
BASIC COMMANDS
init Initialize ipfs local configuration
add <path> Add a file to ipfs
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
Expand All @@ -37,15 +37,15 @@ 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
pin Pin objects to local storage
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
Expand Down
6 changes: 3 additions & 3 deletions core/commands/stat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
4 changes: 2 additions & 2 deletions core/commands/swarm.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
`,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/commands/tour_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ 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
This is where we test our beautiful command line interfaces
Expand Down
4 changes: 2 additions & 2 deletions core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,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))
Expand Down
2 changes: 1 addition & 1 deletion core/corehttp/gateway_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,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
}

Expand Down
2 changes: 1 addition & 1 deletion core/pathresolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func Resolve(ctx context.Context, n *IpfsNode, p path.Path) (*merkledag.Node, er
}
}

// 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 n.Resolver.ResolvePath(ctx, p)
}

Expand Down
4 changes: 2 additions & 2 deletions exchange/bitswap/bitswap.go
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -69,7 +69,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()
Expand Down
2 changes: 1 addition & 1 deletion exchange/interface.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// package exchange defines the IPFS Exchange interface
// package exchange defines the IPFS exchange interface
package exchange

import (
Expand Down
2 changes: 1 addition & 1 deletion fuse/readonly/mount_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion fuse/readonly/readonly_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,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
}
Expand Down
2 changes: 1 addition & 1 deletion importer/importer.go
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion merkledag/merkledag.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// package merkledag implements the ipfs Merkle DAG datastructures.
// package merkledag implements the IPFS Merkle DAG datastructures.
package merkledag

import (
Expand Down
2 changes: 1 addition & 1 deletion mfs/system.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions namesys/namesys.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion path/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,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.
Expand Down
2 changes: 1 addition & 1 deletion repo/config/bootstrap_peers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion repo/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion repo/config/tour.go
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion repo/fsrepo/fsrepo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion routing/dht/dht.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Package dht implements a distributed hash table that satisfies the ipfs routing
// Package dht implements a distributed hash table that satisfies the IPFS routing
// interface. This DHT is modeled after kademlia with Coral and S/Kademlia modifications.
package dht

Expand Down
2 changes: 1 addition & 1 deletion routing/dht/dht_bootstrap.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Package dht implements a distributed hash table that satisfies the ipfs routing
// Package dht implements a distributed hash table that satisfies the IPFS routing
// interface. This DHT is modeled after kademlia with Coral and S/Kademlia modifications.
package dht

Expand Down
2 changes: 1 addition & 1 deletion tar/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func (tr *tarReader) Read(b []byte) (int, error) {

func ExportTar(ctx context.Context, root *dag.Node, 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,
Expand Down
8 changes: 4 additions & 4 deletions test/sharness/t0020-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
'

Expand Down Expand Up @@ -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 &&
Expand All @@ -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
Expand Down
Loading

0 comments on commit 3a3c168

Please sign in to comment.