Skip to content

Commit 1e437c7

Browse files
committed
Fix typos and cleanup
1 parent ed4812b commit 1e437c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+105
-105
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ release).
238238
However,
239239

240240
1. Badger is complicated while flatfs pushes all the complexity down into the
241-
filesystem itself. That means that flatfs is only likely to loose your data
241+
filesystem itself. That means that flatfs is only likely to lose your data
242242
if your underlying filesystem gets corrupted while there are more
243243
opportunities for badger itself to get corrupted.
244244
2. Badger can use a lot of memory. In this release, we've tuned badger to use

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ RUN mkdir /ipfs /ipns \
8787

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

9393
# The default logging level

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ For Linux and MacOSX you can use the purely functional package manager [Nix](htt
108108
$ nix-env -i ipfs
109109
```
110110

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

113113
#### Guix
114114

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

130-
You can also install it trough the Solus software center.
130+
You can also install it through the Solus software center.
131131

132132
#### Snap
133133

bin/check_go_version

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ PREFIX=$(expr "$0" : "\(.*\/\)") || PREFIX='./'
2929
# Include the 'check_at_least_version' function
3030
. ${PREFIX}check_version
3131

32-
# Check that the go binary exist and is in the path
32+
# Check that the go binary exists and is in the path
3333

3434
GOCC=${GOCC="go"}
3535

blocks/blockstoreutil/remove.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
// If a block was removed successfully than the Error string will be
1616
// empty. If a block could not be removed than Error will contain the
1717
// reason the block could not be removed. If the removal was aborted
18-
// due to a fatal error Hash will be be empty, Error will contain the
18+
// due to a fatal error Hash will be empty, Error will contain the
1919
// reason, and no more results will be sent.
2020
type RemovedBlock struct {
2121
Hash string `json:",omitempty"`

cmd/ipfs/daemon.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ You can setup CORS headers the same way:
122122
123123
Shutdown
124124
125-
To shutdown the daemon, send a SIGINT signal to it (e.g. by pressing 'Ctrl-C')
125+
To shut down the daemon, send a SIGINT signal to it (e.g. by pressing 'Ctrl-C')
126126
or send a SIGTERM signal to it (e.g. with 'kill'). It may take a while for the
127127
daemon to shutdown gracefully, but it can be killed forcibly by sending a
128128
second signal.
@@ -434,7 +434,7 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
434434
}()
435435

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

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

628-
// we might have listened to /tcp/0 - lets see what we are listing on
628+
// we might have listened to /tcp/0 - let's see what we are listing on
629629
gwType := "readonly"
630630
if writable {
631631
gwType = "writable"

cmd/ipfs/util/ulimit.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ func ManageFdLimit() (changed bool, newLimit uint64, err error) {
6666
// the soft limit is the value that the kernel enforces for the
6767
// corresponding resource
6868
// the hard limit acts as a ceiling for the soft limit
69-
// an unprivileged process may only set it's soft limit to a
70-
// alue in the range from 0 up to the hard limit
69+
// an unprivileged process may only set its soft limit to a
70+
// value in the range from 0 up to the hard limit
7171
err = setLimit(targetLimit, targetLimit)
7272
switch err {
7373
case nil:
@@ -82,7 +82,7 @@ func ManageFdLimit() (changed bool, newLimit uint64, err error) {
8282
// set the soft value
8383
err = setLimit(targetLimit, hard)
8484
if err != nil {
85-
err = fmt.Errorf("error setting ulimit wihout hard limit: %s", err)
85+
err = fmt.Errorf("error setting ulimit without hard limit: %s", err)
8686
break
8787
}
8888
newLimit = targetLimit

core/commands/cid.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ The optional format string is a printf style format string:
115115

116116
type CidFormatRes struct {
117117
CidStr string // Original Cid String passed in
118-
Formatted string // Formated Result
118+
Formatted string // Formatted Result
119119
ErrorMsg string // Error
120120
}
121121

@@ -255,7 +255,7 @@ var basesCmd = &cmds.Command{
255255
Tagline: "List available multibase encodings.",
256256
},
257257
Options: []cmds.Option{
258-
cmds.BoolOption(prefixOptionName, "also include the single leter prefixes in addition to the code"),
258+
cmds.BoolOption(prefixOptionName, "also include the single letter prefixes in addition to the code"),
259259
cmds.BoolOption(numericOptionName, "also include numeric codes"),
260260
},
261261
Run: func(req *cmds.Request, resp cmds.ResponseEmitter, env cmds.Environment) error {

core/commands/commands.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func (e *commandEncoder) Encode(v interface{}) error {
2626
)
2727

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

3232
for _, s := range cmdPathStrings(cmd, cmd.showOpts) {

core/commands/dag/dag.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ var DagResolveCmd = &cmds.Command{
217217
Helptext: cmds.HelpText{
218218
Tagline: "Resolve ipld block",
219219
ShortDescription: `
220-
'ipfs dag resolve' fetches a dag node from ipfs, prints it's address and remaining path.
220+
'ipfs dag resolve' fetches a dag node from ipfs, prints its address and remaining path.
221221
`,
222222
},
223223
Arguments: []cmds.Argument{
@@ -366,7 +366,7 @@ Maximum supported CAR version: 1
366366
// to the Pinning interface, sigh...
367367
//
368368
// If we didn't have the problem of inability to take multiple pinlocks,
369-
// we could use the Api directly like so (though internally it does the same):
369+
// we could use the api directly like so (though internally it does the same):
370370
//
371371
// // not ideal, but the pinning api takes only paths :(
372372
// rp := path.NewResolvedPath(
@@ -462,7 +462,7 @@ func importWorker(req *cmds.Request, re cmds.ResponseEmitter, api iface.CoreAPI,
462462
//
463463
// every single file in it() is already open before we start
464464
// just close here sooner rather than later for neatness
465-
// and to surface potential erorrs writing on closed fifos
465+
// and to surface potential errors writing on closed fifos
466466
// this won't/can't help with not running out of handles
467467
err := func() error {
468468
defer file.Close()

core/commands/files.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ Newly created leaves will be in the legacy format (Protobuf) if the
712712
CID version is 0, or raw if the CID version is non-zero. Use of the
713713
'--raw-leaves' option will override this behavior.
714714
715-
If the '--flush' option is set to false, changes will not be propogated to the
715+
If the '--flush' option is set to false, changes will not be propagated to the
716716
merkledag root. This can make operations much faster when doing a large number
717717
of writes to a deeper directory structure.
718718
@@ -1166,7 +1166,7 @@ func getFileHandle(r *mfs.Root, path string, create bool, builder cid.Builder) (
11661166
return nil, err
11671167
}
11681168

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

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

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

12251225
pdir, ok := parent.(*mfs.Directory)
12261226
if !ok {
1227-
return nil, errors.New("expected *mfs.Directory, didnt get it. This is likely a race condition")
1227+
return nil, errors.New("expected *mfs.Directory, didn't get it. This is likely a race condition")
12281228
}
12291229
return pdir, nil
12301230
}

core/commands/get.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func makeProgressBar(out io.Writer, l int64) *pb.ProgressBar {
155155
bar.Output = out
156156

157157
// the progress bar lib doesn't give us a way to get the width of the output,
158-
// so as a hack we just use a callback to measure the output, then git rid of it
158+
// so as a hack we just use a callback to measure the output, then get rid of it
159159
bar.Callback = func(line string) {
160160
terminalWidth := len(line)
161161
bar.Callback = nil

core/commands/pin.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -522,8 +522,8 @@ var updatePinCmd = &cmds.Command{
522522
Efficiently pins a new object based on differences from an existing one and,
523523
by default, removes the old pin.
524524
525-
This commands is useful when the new pin contains many similarities or is a
526-
derivative of an existing one, particuarly for large objects. This allows a more
525+
This command is useful when the new pin contains many similarities or is a
526+
derivative of an existing one, particularly for large objects. This allows a more
527527
efficient DAG-traversal which fully skips already-pinned branches from the old
528528
object. As a requirement, the old object needs to be an existing recursive
529529
pin.

core/corehttp/corehttp.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func ListenAndServe(n *core.IpfsNode, listeningMultiAddr string, options ...Serv
7373
return err
7474
}
7575

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

core/corehttp/gateway_handler.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ func (i *gatewayHandler) getOrHeadHandler(w http.ResponseWriter, r *http.Request
228228
w.Header().Set("Etag", etag)
229229

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

324-
// add the correct link depending on wether the path ends with a slash
324+
// add the correct link depending on whether the path ends with a slash
325325
default:
326326
if strings.HasSuffix(backLink, "/") {
327327
backLink += "./.."

core/coreunix/add_test.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func TestAddMultipleGCLive(t *testing.T) {
8787
// GC shouldn't get the lock until after the file is completely added
8888
select {
8989
case <-gc1started:
90-
t.Fatal("gc shouldnt have started yet")
90+
t.Fatal("gc shouldn't have started yet")
9191
default:
9292
}
9393

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

119119
select {
120120
case <-gc2started:
121-
t.Fatal("gc shouldnt have started yet")
121+
t.Fatal("gc shouldn't have started yet")
122122
default:
123123
}
124124

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

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

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

210210
select {
211211
case <-gcstarted:
212-
t.Fatal("gc shouldnt have started yet")
212+
t.Fatal("gc shouldn't have started yet")
213213
default:
214214
}
215215

coverage/Rules.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ $(d)/ipfs: $(d)/main
4040
CLEAN += $(d)/ipfs
4141

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

docs/config.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ Below is a list of the most common public gateway setups.
620620
### `Identity.PeerID`
621621

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

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

700700
The `server` configuration profile fills up this list with sensible defaults,

docs/debug-guide.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ If you feel intrepid, you can dump this information and investigate it yourself:
3434

3535
### Analyzing the stack dump
3636

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

4040
```

docs/environment-variables.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Default: https://ipfs.io/ipfs/$something (depends on the IPFS version)
8484

8585
## `IPFS_NS_MAP`
8686

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

9090
Example:

fuse/ipns/ipns_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ func TestFileSizeReporting(t *testing.T) {
271271
}
272272
}
273273

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

460460
if !bytes.Equal(data, out) {
461-
t.Errorf("Data didnt match in %s: expected %v, got %v", name, data, out)
461+
t.Errorf("Data didn't match in %s: expected %v, got %v", name, data, out)
462462
}
463463
}
464464
}

fuse/node/mount_darwin.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ For more help, see:
4242
`
4343

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

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

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

239239
switch val := val.(type) {
@@ -242,7 +242,7 @@ func userAskedToSkipFuseCheck(node *core.IpfsNode) (skip bool, err error) {
242242
case bool:
243243
return val, nil
244244
default:
245-
// got config value, but it's invalid... dont skip check, ask the user to fix it...
245+
// got config value, but it's invalid... don't skip check, ask the user to fix it...
246246
return false, fmt.Errorf(errStrFixConfig, dontCheckOSXFUSEConfigKey, val,
247247
dontCheckOSXFUSEConfigKey)
248248
}

0 commit comments

Comments
 (0)