Skip to content

Commit

Permalink
Merge pull request #7181 from rex4539/fix-typos
Browse files Browse the repository at this point in the history
Fix typos and cleanup
  • Loading branch information
Stebalien committed Apr 21, 2020
2 parents 4b649bf + 1e437c7 commit 9033ba9
Show file tree
Hide file tree
Showing 64 changed files with 104 additions and 104 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ release).
However,

1. Badger is complicated while flatfs pushes all the complexity down into the
filesystem itself. That means that flatfs is only likely to loose your data
filesystem itself. That means that flatfs is only likely to lose your data
if your underlying filesystem gets corrupted while there are more
opportunities for badger itself to get corrupted.
2. Badger can use a lot of memory. In this release, we've tuned badger to use
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ RUN mkdir /ipfs /ipns \

# Expose the fs-repo as a volume.
# start_ipfs initializes an fs-repo if none is mounted.
# Important this happens after the USER directive so permission are correct.
# Important this happens after the USER directive so permissions are correct.
VOLUME $IPFS_PATH

# The default logging level
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ For Linux and MacOSX you can use the purely functional package manager [Nix](htt
$ nix-env -i ipfs
```

You can also install the Package by using it's attribute name, which is also `ipfs`.
You can also install the Package by using its attribute name, which is also `ipfs`.

#### Guix

Expand All @@ -127,7 +127,7 @@ In solus, go-ipfs is available in the main repository as
$ sudo eopkg install go-ipfs
```

You can also install it trough the Solus software center.
You can also install it through the Solus software center.

#### Snap

Expand Down
2 changes: 1 addition & 1 deletion bin/check_go_version
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ PREFIX=$(expr "$0" : "\(.*\/\)") || PREFIX='./'
# Include the 'check_at_least_version' function
. ${PREFIX}check_version

# Check that the go binary exist and is in the path
# Check that the go binary exists and is in the path

GOCC=${GOCC="go"}

Expand Down
2 changes: 1 addition & 1 deletion blocks/blockstoreutil/remove.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
// If a block was removed successfully than the Error string will be
// empty. If a block could not be removed than Error will contain the
// reason the block could not be removed. If the removal was aborted
// due to a fatal error Hash will be be empty, Error will contain the
// due to a fatal error Hash will be empty, Error will contain the
// reason, and no more results will be sent.
type RemovedBlock struct {
Hash string `json:",omitempty"`
Expand Down
8 changes: 4 additions & 4 deletions cmd/ipfs/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ You can setup CORS headers the same way:
Shutdown
To shutdown the daemon, send a SIGINT signal to it (e.g. by pressing 'Ctrl-C')
To shut down the daemon, send a SIGINT signal to it (e.g. by pressing 'Ctrl-C')
or send a SIGTERM signal to it (e.g. with 'kill'). It may take a while for the
daemon to shutdown gracefully, but it can be killed forcibly by sending a
second signal.
Expand Down Expand Up @@ -434,7 +434,7 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
}()

// collect long-running errors and block for shutdown
// TODO(cryptix): our fuse currently doesnt follow this pattern for graceful shutdown
// TODO(cryptix): our fuse currently doesn't follow this pattern for graceful shutdown
var errs error
for err := range merge(apiErrc, gwErrc, gcErrc) {
if err != nil {
Expand Down Expand Up @@ -489,7 +489,7 @@ func serveHTTPApi(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, error
}

for _, listener := range listeners {
// we might have listened to /tcp/0 - lets see what we are listing on
// we might have listened to /tcp/0 - let's see what we are listing on
fmt.Printf("API server listening on %s\n", listener.Multiaddr())
// Browsers require TCP.
switch listener.Addr().Network() {
Expand Down Expand Up @@ -625,7 +625,7 @@ func serveHTTPGateway(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, e
listeners = append(listeners, gwLis)
}

// we might have listened to /tcp/0 - lets see what we are listing on
// we might have listened to /tcp/0 - let's see what we are listing on
gwType := "readonly"
if writable {
gwType = "writable"
Expand Down
6 changes: 3 additions & 3 deletions cmd/ipfs/util/ulimit.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ func ManageFdLimit() (changed bool, newLimit uint64, err error) {
// the soft limit is the value that the kernel enforces for the
// corresponding resource
// the hard limit acts as a ceiling for the soft limit
// an unprivileged process may only set it's soft limit to a
// alue in the range from 0 up to the hard limit
// an unprivileged process may only set its soft limit to a
// value in the range from 0 up to the hard limit
err = setLimit(targetLimit, targetLimit)
switch err {
case nil:
Expand All @@ -82,7 +82,7 @@ func ManageFdLimit() (changed bool, newLimit uint64, err error) {
// set the soft value
err = setLimit(targetLimit, hard)
if err != nil {
err = fmt.Errorf("error setting ulimit wihout hard limit: %s", err)
err = fmt.Errorf("error setting ulimit without hard limit: %s", err)
break
}
newLimit = targetLimit
Expand Down
4 changes: 2 additions & 2 deletions core/commands/cid.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ The optional format string is a printf style format string:

type CidFormatRes struct {
CidStr string // Original Cid String passed in
Formatted string // Formated Result
Formatted string // Formatted Result
ErrorMsg string // Error
}

Expand Down Expand Up @@ -255,7 +255,7 @@ var basesCmd = &cmds.Command{
Tagline: "List available multibase encodings.",
},
Options: []cmds.Option{
cmds.BoolOption(prefixOptionName, "also include the single leter prefixes in addition to the code"),
cmds.BoolOption(prefixOptionName, "also include the single letter prefixes in addition to the code"),
cmds.BoolOption(numericOptionName, "also include numeric codes"),
},
Run: func(req *cmds.Request, resp cmds.ResponseEmitter, env cmds.Environment) error {
Expand Down
2 changes: 1 addition & 1 deletion core/commands/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func (e *commandEncoder) Encode(v interface{}) error {
)

if cmd, ok = v.(*Command); !ok {
return fmt.Errorf(`core/commands: uenxpected type %T, expected *"core/commands".Command`, v)
return fmt.Errorf(`core/commands: unexpected type %T, expected *"core/commands".Command`, v)
}

for _, s := range cmdPathStrings(cmd, cmd.showOpts) {
Expand Down
6 changes: 3 additions & 3 deletions core/commands/dag/dag.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ var DagResolveCmd = &cmds.Command{
Helptext: cmds.HelpText{
Tagline: "Resolve ipld block",
ShortDescription: `
'ipfs dag resolve' fetches a dag node from ipfs, prints it's address and remaining path.
'ipfs dag resolve' fetches a dag node from ipfs, prints its address and remaining path.
`,
},
Arguments: []cmds.Argument{
Expand Down Expand Up @@ -366,7 +366,7 @@ Maximum supported CAR version: 1
// to the Pinning interface, sigh...
//
// If we didn't have the problem of inability to take multiple pinlocks,
// we could use the Api directly like so (though internally it does the same):
// we could use the api directly like so (though internally it does the same):
//
// // not ideal, but the pinning api takes only paths :(
// rp := path.NewResolvedPath(
Expand Down Expand Up @@ -462,7 +462,7 @@ func importWorker(req *cmds.Request, re cmds.ResponseEmitter, api iface.CoreAPI,
//
// every single file in it() is already open before we start
// just close here sooner rather than later for neatness
// and to surface potential erorrs writing on closed fifos
// and to surface potential errors writing on closed fifos
// this won't/can't help with not running out of handles
err := func() error {
defer file.Close()
Expand Down
6 changes: 3 additions & 3 deletions core/commands/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ func getFileHandle(r *mfs.Root, path string, create bool, builder cid.Builder) (
return nil, err
}

// if create is specified and the file doesnt exist, we create the file
// if create is specified and the file doesn't exist, we create the file
dirname, fname := gopath.Split(path)
pdir, err := getParentDir(r, dirname)
if err != nil {
Expand All @@ -1191,7 +1191,7 @@ func getFileHandle(r *mfs.Root, path string, create bool, builder cid.Builder) (

fi, ok := fsn.(*mfs.File)
if !ok {
return nil, errors.New("expected *mfs.File, didnt get it. This is likely a race condition")
return nil, errors.New("expected *mfs.File, didn't get it. This is likely a race condition")
}
return fi, nil

Expand Down Expand Up @@ -1224,7 +1224,7 @@ func getParentDir(root *mfs.Root, dir string) (*mfs.Directory, error) {

pdir, ok := parent.(*mfs.Directory)
if !ok {
return nil, errors.New("expected *mfs.Directory, didnt get it. This is likely a race condition")
return nil, errors.New("expected *mfs.Directory, didn't get it. This is likely a race condition")
}
return pdir, nil
}
2 changes: 1 addition & 1 deletion core/commands/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ func makeProgressBar(out io.Writer, l int64) *pb.ProgressBar {
bar.Output = out

// the progress bar lib doesn't give us a way to get the width of the output,
// so as a hack we just use a callback to measure the output, then git rid of it
// so as a hack we just use a callback to measure the output, then get rid of it
bar.Callback = func(line string) {
terminalWidth := len(line)
bar.Callback = nil
Expand Down
4 changes: 2 additions & 2 deletions core/commands/pin.go
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,8 @@ var updatePinCmd = &cmds.Command{
Efficiently pins a new object based on differences from an existing one and,
by default, removes the old pin.
This commands is useful when the new pin contains many similarities or is a
derivative of an existing one, particuarly for large objects. This allows a more
This command is useful when the new pin contains many similarities or is a
derivative of an existing one, particularly for large objects. This allows a more
efficient DAG-traversal which fully skips already-pinned branches from the old
object. As a requirement, the old object needs to be an existing recursive
pin.
Expand Down
2 changes: 1 addition & 1 deletion core/corehttp/corehttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func ListenAndServe(n *core.IpfsNode, listeningMultiAddr string, options ...Serv
return err
}

// we might have listened to /tcp/0 - lets see what we are listing on
// we might have listened to /tcp/0 - let's see what we are listing on
addr = list.Multiaddr()
fmt.Printf("API server listening on %s\n", addr)

Expand Down
4 changes: 2 additions & 2 deletions core/corehttp/gateway_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func (i *gatewayHandler) getOrHeadHandler(w http.ResponseWriter, r *http.Request
w.Header().Set("Etag", etag)

// set these headers _after_ the error, for we may just not have it
// and dont want the client to cache a 500 response...
// and don't want the client to cache a 500 response...
// and only if it's /ipfs!
// TODO: break this out when we split /ipfs /ipns routes.
modtime := time.Now()
Expand Down Expand Up @@ -321,7 +321,7 @@ func (i *gatewayHandler) getOrHeadHandler(w http.ResponseWriter, r *http.Request
// keep backlink
case len(pathSplit) == 4 && pathSplit[3] == "": // url: /ipfs/$hash/

// add the correct link depending on wether the path ends with a slash
// add the correct link depending on whether the path ends with a slash
default:
if strings.HasSuffix(backLink, "/") {
backLink += "./.."
Expand Down
10 changes: 5 additions & 5 deletions core/coreunix/add_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func TestAddMultipleGCLive(t *testing.T) {
// GC shouldn't get the lock until after the file is completely added
select {
case <-gc1started:
t.Fatal("gc shouldnt have started yet")
t.Fatal("gc shouldn't have started yet")
default:
}

Expand Down Expand Up @@ -118,7 +118,7 @@ func TestAddMultipleGCLive(t *testing.T) {

select {
case <-gc2started:
t.Fatal("gc shouldnt have started yet")
t.Fatal("gc shouldn't have started yet")
default:
}

Expand Down Expand Up @@ -192,7 +192,7 @@ func TestAddGCLive(t *testing.T) {
case o := <-out:
addedHashes[o.(*coreiface.AddEvent).Path.Cid().String()] = struct{}{}
case <-addDone:
t.Fatal("add shouldnt complete yet")
t.Fatal("add shouldn't complete yet")
}

var gcout <-chan gc.Result
Expand All @@ -202,14 +202,14 @@ func TestAddGCLive(t *testing.T) {
gcout = gc.GC(context.Background(), node.Blockstore, node.Repo.Datastore(), node.Pinning, nil)
}()

// gc shouldnt start until we let the add finish its current file.
// gc shouldn't start until we let the add finish its current file.
if _, err := pipew.Write([]byte("some data for file b")); err != nil {
t.Fatal(err)
}

select {
case <-gcstarted:
t.Fatal("gc shouldnt have started yet")
t.Fatal("gc shouldn't have started yet")
default:
}

Expand Down
2 changes: 1 addition & 1 deletion coverage/Rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ $(d)/ipfs: $(d)/main
CLEAN += $(d)/ipfs

ifneq ($(filter coverage%,$(MAKECMDGOALS)),)
# this is quite hacky but it is best way I could fiture out
# this is quite hacky but it is best way I could figure out
DEPS_test/sharness += cmd/ipfs/ipfs-test-cover $(d)/coverage_deps $(d)/ipfs
endif

Expand Down
4 changes: 2 additions & 2 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ Below is a list of the most common public gateway setups.
### `Identity.PeerID`

The unique PKI identity label for this configs peer. Set on init and never read,
its merely here for convenience. Ipfs will always generate the peerID from its
it's merely here for convenience. Ipfs will always generate the peerID from its
keypair at runtime.

### `Identity.PrivKey`
Expand Down Expand Up @@ -694,7 +694,7 @@ An array of addresses (multiaddr netmasks) to not dial. By default, IPFS nodes
advertise _all_ addresses, even internal ones. This makes it easier for nodes on
the same network to reach each other. Unfortunately, this means that an IPFS
node will try to connect to one or more private IP addresses whenever dialing
another node, even if this other node is on a different network. This may may
another node, even if this other node is on a different network. This may
trigger netscan alerts on some hosting providers or cause strain in some setups.

The `server` configuration profile fills up this list with sensible defaults,
Expand Down
2 changes: 1 addition & 1 deletion docs/debug-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ If you feel intrepid, you can dump this information and investigate it yourself:

### Analyzing the stack dump

The first thing to look for is hung goroutines -- any goroutine thats been stuck
The first thing to look for is hung goroutines -- any goroutine that's been stuck
for over a minute will note that in the trace. It looks something like:

```
Expand Down
2 changes: 1 addition & 1 deletion docs/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Default: https://ipfs.io/ipfs/$something (depends on the IPFS version)

## `IPFS_NS_MAP`

Adds static namesys records for deteministic tests and debugging.
Adds static namesys records for deterministic tests and debugging.
Useful for testing things like DNSLink without real DNS lookup.

Example:
Expand Down
4 changes: 2 additions & 2 deletions fuse/ipns/ipns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func TestFileSizeReporting(t *testing.T) {
}
}

// Test to make sure you cant create multiple entries with the same name
// Test to make sure you can't create multiple entries with the same name
func TestDoubleEntryFailure(t *testing.T) {
if testing.Short() {
t.SkipNow()
Expand Down Expand Up @@ -458,7 +458,7 @@ func TestFSThrash(t *testing.T) {
}

if !bytes.Equal(data, out) {
t.Errorf("Data didnt match in %s: expected %v, got %v", name, data, out)
t.Errorf("Data didn't match in %s: expected %v, got %v", name, data, out)
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions fuse/node/mount_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ For more help, see:
`

// errStrNoFuseHeaders is included in the output of `go get <fuseVersionPkg>` if there
// are no fuse headers. this means they dont have OSXFUSE installed.
// are no fuse headers. this means they don't have OSXFUSE installed.
var errStrNoFuseHeaders = "no such file or directory: '/usr/local/lib/libosxfuse.dylib'"

var errStrUpgradeFuse = `OSXFUSE version %s not supported.
Expand Down Expand Up @@ -208,10 +208,10 @@ func ensureFuseVersionIsInstalled() error {
cmd.Stdout = cmdout
cmd.Stderr = cmdout
if err := cmd.Run(); err != nil {
// Ok, install fuse-version failed. is it they dont have fuse?
// Ok, install fuse-version failed. is it they don't have fuse?
cmdoutstr := cmdout.String()
if strings.Contains(cmdoutstr, errStrNoFuseHeaders) {
// yes! it is! they dont have fuse!
// yes! it is! they don't have fuse!
return fmt.Errorf(errStrFuseRequired)
}

Expand All @@ -233,7 +233,7 @@ func ensureFuseVersionIsInstalled() error {
func userAskedToSkipFuseCheck(node *core.IpfsNode) (skip bool, err error) {
val, err := node.Repo.GetConfigKey(dontCheckOSXFUSEConfigKey)
if err != nil {
return false, nil // failed to get config value. dont skip check.
return false, nil // failed to get config value. don't skip check.
}

switch val := val.(type) {
Expand All @@ -242,7 +242,7 @@ func userAskedToSkipFuseCheck(node *core.IpfsNode) (skip bool, err error) {
case bool:
return val, nil
default:
// got config value, but it's invalid... dont skip check, ask the user to fix it...
// got config value, but it's invalid... don't skip check, ask the user to fix it...
return false, fmt.Errorf(errStrFixConfig, dontCheckOSXFUSEConfigKey, val,
dontCheckOSXFUSEConfigKey)
}
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 @@ -224,7 +224,7 @@ func (s *Node) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error) {
}

func (s *Node) Getxattr(ctx context.Context, req *fuse.GetxattrRequest, resp *fuse.GetxattrResponse) error {
// TODO: is nil the right response for 'bug off, we aint got none' ?
// TODO: is nil the right response for 'bug off, we ain't got none' ?
resp.Xattr = nil
return nil
}
Expand Down

0 comments on commit 9033ba9

Please sign in to comment.