Fix typos and cleanup
Dimitris Apostolou committed
Apr 18, 2020 at 17:45 UTC
1e437c7e972aa08d1de59f016d3297cf9b5a3106
64 files changed
+105
-105
CHANGELOG.md
+1
-1
@@ -238,7 +238,7 @@ release).
238
However,
239
240
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
242
if your underlying filesystem gets corrupted while there are more
243
opportunities for badger itself to get corrupted.
244
2. Badger can use a lot of memory. In this release, we've tuned badger to use
Dockerfile
+1
-1
@@ -87,7 +87,7 @@ RUN mkdir /ipfs /ipns \
87
88
# Expose the fs-repo as a volume.
89
# 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.
91
VOLUME $IPFS_PATH
92
93
# The default logging level
README.md
+2
-2
@@ -108,7 +108,7 @@ For Linux and MacOSX you can use the purely functional package manager [Nix](htt
108
$ nix-env -i ipfs
109
```
110
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`.
112
113
#### Guix
114
@@ -127,7 +127,7 @@ In solus, go-ipfs is available in the main repository as
127
$ sudo eopkg install go-ipfs
128
```
129
130
-You can also install it trough the Solus software center.
130
+You can also install it through the Solus software center.
131
132
#### Snap
133
bin/check_go_version
+1
-1
@@ -29,7 +29,7 @@ PREFIX=$(expr "$0" : "\(.*\/\)") || PREFIX='./'
29
# Include the 'check_at_least_version' function
30
. ${PREFIX}check_version
31
32
-# Check that the go binary exist and is in the path
32
+# Check that the go binary exists and is in the path
33
34
GOCC=${GOCC="go"}
35
blocks/blockstoreutil/remove.go
+1
-1
@@ -15,7 +15,7 @@ import (
15
// If a block was removed successfully than the Error string will be
16
// empty. If a block could not be removed than Error will contain the
17
// 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
19
// reason, and no more results will be sent.
20
type RemovedBlock struct {
21
Hash string `json:",omitempty"`
cmd/ipfs/daemon.go
+4
-4
@@ -122,7 +122,7 @@ You can setup CORS headers the same way:
122
123
Shutdown
124
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')
126
or send a SIGTERM signal to it (e.g. with 'kill'). It may take a while for the
127
daemon to shutdown gracefully, but it can be killed forcibly by sending a
128
second signal.
@@ -434,7 +434,7 @@ func daemonFunc(req *cmds.Request, re cmds.ResponseEmitter, env cmds.Environment
434
}()
435
436
// 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
438
var errs error
439
for err := range merge(apiErrc, gwErrc, gcErrc) {
440
if err != nil {
@@ -489,7 +489,7 @@ func serveHTTPApi(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, error
489
}
490
491
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
493
fmt.Printf("API server listening on %s\n", listener.Multiaddr())
494
// Browsers require TCP.
495
switch listener.Addr().Network() {
@@ -625,7 +625,7 @@ func serveHTTPGateway(req *cmds.Request, cctx *oldcmds.Context) (<-chan error, e
625
listeners = append(listeners, gwLis)
626
}
627
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
629
gwType := "readonly"
630
if writable {
631
gwType = "writable"
cmd/ipfs/util/ulimit.go
+3
-3
@@ -66,8 +66,8 @@ func ManageFdLimit() (changed bool, newLimit uint64, err error) {
66
// the soft limit is the value that the kernel enforces for the
67
// corresponding resource
68
// 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
71
err = setLimit(targetLimit, targetLimit)
72
switch err {
73
case nil:
@@ -82,7 +82,7 @@ func ManageFdLimit() (changed bool, newLimit uint64, err error) {
82
// set the soft value
83
err = setLimit(targetLimit, hard)
84
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)
86
break
87
}
88
newLimit = targetLimit
core/commands/cid.go
+2
-2
@@ -115,7 +115,7 @@ The optional format string is a printf style format string:
115
116
type CidFormatRes struct {
117
CidStr string // Original Cid String passed in
118
- Formatted string // Formated Result
118
+ Formatted string // Formatted Result
119
ErrorMsg string // Error
120
}
121
@@ -255,7 +255,7 @@ var basesCmd = &cmds.Command{
255
Tagline: "List available multibase encodings.",
256
},
257
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"),
259
cmds.BoolOption(numericOptionName, "also include numeric codes"),
260
},
261
Run: func(req *cmds.Request, resp cmds.ResponseEmitter, env cmds.Environment) error {
core/commands/commands.go
+1
-1
@@ -26,7 +26,7 @@ func (e *commandEncoder) Encode(v interface{}) error {
26
)
27
28
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)
30
}
31
32
for _, s := range cmdPathStrings(cmd, cmd.showOpts) {
core/commands/dag/dag.go
+3
-3
@@ -217,7 +217,7 @@ var DagResolveCmd = &cmds.Command{
217
Helptext: cmds.HelpText{
218
Tagline: "Resolve ipld block",
219
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.
221
`,
222
},
223
Arguments: []cmds.Argument{
@@ -366,7 +366,7 @@ Maximum supported CAR version: 1
366
// to the Pinning interface, sigh...
367
//
368
// 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):
370
//
371
// // not ideal, but the pinning api takes only paths :(
372
// rp := path.NewResolvedPath(
@@ -462,7 +462,7 @@ func importWorker(req *cmds.Request, re cmds.ResponseEmitter, api iface.CoreAPI,
462
//
463
// every single file in it() is already open before we start
464
// 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
466
// this won't/can't help with not running out of handles
467
err := func() error {
468
defer file.Close()
core/commands/files.go
+4
-4
@@ -712,7 +712,7 @@ Newly created leaves will be in the legacy format (Protobuf) if the
712
CID version is 0, or raw if the CID version is non-zero. Use of the
713
'--raw-leaves' option will override this behavior.
714
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
716
merkledag root. This can make operations much faster when doing a large number
717
of writes to a deeper directory structure.
718
@@ -1166,7 +1166,7 @@ func getFileHandle(r *mfs.Root, path string, create bool, builder cid.Builder) (
1166
return nil, err
1167
}
1168
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
1170
dirname, fname := gopath.Split(path)
1171
pdir, err := getParentDir(r, dirname)
1172
if err != nil {
@@ -1191,7 +1191,7 @@ func getFileHandle(r *mfs.Root, path string, create bool, builder cid.Builder) (
1191
1192
fi, ok := fsn.(*mfs.File)
1193
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")
1195
}
1196
return fi, nil
1197
@@ -1224,7 +1224,7 @@ func getParentDir(root *mfs.Root, dir string) (*mfs.Directory, error) {
1224
1225
pdir, ok := parent.(*mfs.Directory)
1226
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")
1228
}
1229
return pdir, nil
1230
}
core/commands/get.go
+1
-1
@@ -155,7 +155,7 @@ func makeProgressBar(out io.Writer, l int64) *pb.ProgressBar {
155
bar.Output = out
156
157
// 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
159
bar.Callback = func(line string) {
160
terminalWidth := len(line)
161
bar.Callback = nil
core/commands/pin.go
+2
-2
@@ -522,8 +522,8 @@ var updatePinCmd = &cmds.Command{
522
Efficiently pins a new object based on differences from an existing one and,
523
by default, removes the old pin.
524
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
527
efficient DAG-traversal which fully skips already-pinned branches from the old
528
object. As a requirement, the old object needs to be an existing recursive
529
pin.
core/corehttp/corehttp.go
+1
-1
@@ -73,7 +73,7 @@ func ListenAndServe(n *core.IpfsNode, listeningMultiAddr string, options ...Serv
73
return err
74
}
75
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
77
addr = list.Multiaddr()
78
fmt.Printf("API server listening on %s\n", addr)
79
core/corehttp/gateway_handler.go
+2
-2
@@ -228,7 +228,7 @@ func (i *gatewayHandler) getOrHeadHandler(w http.ResponseWriter, r *http.Request
228
w.Header().Set("Etag", etag)
229
230
// 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...
232
// and only if it's /ipfs!
233
// TODO: break this out when we split /ipfs /ipns routes.
234
modtime := time.Now()
@@ -321,7 +321,7 @@ func (i *gatewayHandler) getOrHeadHandler(w http.ResponseWriter, r *http.Request
321
// keep backlink
322
case len(pathSplit) == 4 && pathSplit[3] == "": // url: /ipfs/$hash/
323
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
325
default:
326
if strings.HasSuffix(backLink, "/") {
327
backLink += "./.."
core/coreunix/add_test.go
+5
-5
@@ -87,7 +87,7 @@ func TestAddMultipleGCLive(t *testing.T) {
87
// GC shouldn't get the lock until after the file is completely added
88
select {
89
case <-gc1started:
90
- t.Fatal("gc shouldnt have started yet")
90
+ t.Fatal("gc shouldn't have started yet")
91
default:
92
}
93
@@ -118,7 +118,7 @@ func TestAddMultipleGCLive(t *testing.T) {
118
119
select {
120
case <-gc2started:
121
- t.Fatal("gc shouldnt have started yet")
121
+ t.Fatal("gc shouldn't have started yet")
122
default:
123
}
124
@@ -192,7 +192,7 @@ func TestAddGCLive(t *testing.T) {
192
case o := <-out:
193
addedHashes[o.(*coreiface.AddEvent).Path.Cid().String()] = struct{}{}
194
case <-addDone:
195
- t.Fatal("add shouldnt complete yet")
195
+ t.Fatal("add shouldn't complete yet")
196
}
197
198
var gcout <-chan gc.Result
@@ -202,14 +202,14 @@ func TestAddGCLive(t *testing.T) {
202
gcout = gc.GC(context.Background(), node.Blockstore, node.Repo.Datastore(), node.Pinning, nil)
203
}()
204
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.
206
if _, err := pipew.Write([]byte("some data for file b")); err != nil {
207
t.Fatal(err)
208
}
209
210
select {
211
case <-gcstarted:
212
- t.Fatal("gc shouldnt have started yet")
212
+ t.Fatal("gc shouldn't have started yet")
213
default:
214
}
215
coverage/Rules.mk
+1
-1
@@ -40,7 +40,7 @@ $(d)/ipfs: $(d)/main
40
CLEAN += $(d)/ipfs
41
42
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
44
DEPS_test/sharness += cmd/ipfs/ipfs-test-cover $(d)/coverage_deps $(d)/ipfs
45
endif
46
docs/config.md
+2
-2
@@ -620,7 +620,7 @@ Below is a list of the most common public gateway setups.
620
### `Identity.PeerID`
621
622
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
624
keypair at runtime.
625
626
### `Identity.PrivKey`
@@ -694,7 +694,7 @@ An array of addresses (multiaddr netmasks) to not dial. By default, IPFS nodes
694
advertise _all_ addresses, even internal ones. This makes it easier for nodes on
695
the same network to reach each other. Unfortunately, this means that an IPFS
696
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
698
trigger netscan alerts on some hosting providers or cause strain in some setups.
699
700
The `server` configuration profile fills up this list with sensible defaults,
docs/debug-guide.md
+1
-1
@@ -34,7 +34,7 @@ If you feel intrepid, you can dump this information and investigate it yourself:
34
35
### Analyzing the stack dump
36
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
38
for over a minute will note that in the trace. It looks something like:
39
40
```
docs/environment-variables.md
+1
-1
@@ -84,7 +84,7 @@ Default: https://ipfs.io/ipfs/$something (depends on the IPFS version)
84
85
## `IPFS_NS_MAP`
86
87
-Adds static namesys records for deteministic tests and debugging.
87
+Adds static namesys records for deterministic tests and debugging.
88
Useful for testing things like DNSLink without real DNS lookup.
89
90
Example:
fuse/ipns/ipns_test.go
+2
-2
@@ -271,7 +271,7 @@ func TestFileSizeReporting(t *testing.T) {
271
}
272
}
273
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
275
func TestDoubleEntryFailure(t *testing.T) {
276
if testing.Short() {
277
t.SkipNow()
@@ -458,7 +458,7 @@ func TestFSThrash(t *testing.T) {
458
}
459
460
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)
462
}
463
}
464
}
fuse/node/mount_darwin.go
+5
-5
@@ -42,7 +42,7 @@ For more help, see:
42
`
43
44
// 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.
46
var errStrNoFuseHeaders = "no such file or directory: '/usr/local/lib/libosxfuse.dylib'"
47
48
var errStrUpgradeFuse = `OSXFUSE version %s not supported.
@@ -208,10 +208,10 @@ func ensureFuseVersionIsInstalled() error {
208
cmd.Stdout = cmdout
209
cmd.Stderr = cmdout
210
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?
212
cmdoutstr := cmdout.String()
213
if strings.Contains(cmdoutstr, errStrNoFuseHeaders) {
214
- // yes! it is! they dont have fuse!
214
+ // yes! it is! they don't have fuse!
215
return fmt.Errorf(errStrFuseRequired)
216
}
217
@@ -233,7 +233,7 @@ func ensureFuseVersionIsInstalled() error {
233
func userAskedToSkipFuseCheck(node *core.IpfsNode) (skip bool, err error) {
234
val, err := node.Repo.GetConfigKey(dontCheckOSXFUSEConfigKey)
235
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.
237
}
238
239
switch val := val.(type) {
@@ -242,7 +242,7 @@ func userAskedToSkipFuseCheck(node *core.IpfsNode) (skip bool, err error) {
242
case bool:
243
return val, nil
244
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...
246
return false, fmt.Errorf(errStrFixConfig, dontCheckOSXFUSEConfigKey, val,
247
dontCheckOSXFUSEConfigKey)
248
}
fuse/readonly/readonly_unix.go
+1
-1
@@ -224,7 +224,7 @@ func (s *Node) ReadDirAll(ctx context.Context) ([]fuse.Dirent, error) {
224
}
225
226
func (s *Node) Getxattr(ctx context.Context, req *fuse.GetxattrRequest, resp *fuse.GetxattrResponse) error {
227
- // TODO: is nil the right response for 'bug off, we aint got none' ?
227
+ // TODO: is nil the right response for 'bug off, we ain't got none' ?
228
resp.Xattr = nil
229
return nil
230
}
gc/gc.go
+1
-1
@@ -250,7 +250,7 @@ func ColoredSet(ctx context.Context, pn pin.Pinner, ng ipld.NodeGetter, bestEffo
250
}
251
252
// ErrCannotFetchAllLinks is returned as the last Result in the GC output
253
-// channel when there was a error creating the marked set because of a
253
+// channel when there was an error creating the marked set because of a
254
// problem when finding descendants.
255
var ErrCannotFetchAllLinks = errors.New("garbage collection aborted: could not retrieve some links")
256
keystore/keystore.go
+2
-2
@@ -19,7 +19,7 @@ var codec = base32.StdEncoding.WithPadding(base32.NoPadding)
19
20
// Keystore provides a key management interface
21
type Keystore interface {
22
- // Has returns whether or not a key exist in the Keystore
22
+ // Has returns whether or not a key exists in the Keystore
23
Has(string) (bool, error)
24
// Put stores a key in the Keystore, if a key with the same name already exists, returns ErrKeyExists
25
Put(string, ci.PrivKey) error
@@ -57,7 +57,7 @@ func NewFSKeystore(dir string) (*FSKeystore, error) {
57
return &FSKeystore{dir}, nil
58
}
59
60
-// Has returns whether or not a key exist in the Keystore
60
+// Has returns whether or not a key exists in the Keystore
61
func (ks *FSKeystore) Has(name string) (bool, error) {
62
name, err := encode(name)
63
if err != nil {
keystore/keystore_test.go
+2
-2
@@ -137,7 +137,7 @@ func TestKeystoreBasics(t *testing.T) {
137
}
138
139
if err := ks.Put("", k1); err == nil {
140
- t.Fatal("shouldnt be able to put a key with no name")
140
+ t.Fatal("shouldn't be able to put a key with no name")
141
}
142
143
if err := ks.Put(".foo", k1); err != nil {
@@ -238,7 +238,7 @@ func assertGetKey(ks Keystore, name string, exp ci.PrivKey) error {
238
}
239
240
if !outK.Equals(exp) {
241
- return fmt.Errorf("key we got out didnt match expectation")
241
+ return fmt.Errorf("key we got out didn't match expectation")
242
}
243
244
return nil
keystore/memkeystore.go
+1
-1
@@ -17,7 +17,7 @@ func NewMemKeystore() *MemKeystore {
17
return &MemKeystore{make(map[string]ci.PrivKey)}
18
}
19
20
-// Has return whether or not a key exist in the Keystore
20
+// Has return whether or not a key exists in the Keystore
21
func (mk *MemKeystore) Has(name string) (bool, error) {
22
_, ok := mk.keys[name]
23
return ok, nil
keystore/memkeystore_test.go
+1
-1
@@ -90,7 +90,7 @@ func TestMemKeyStoreBasics(t *testing.T) {
90
}
91
92
if err := ks.Put("", k1); err == nil {
93
- t.Fatal("shouldnt be able to put a key with no name")
93
+ t.Fatal("shouldn't be able to put a key with no name")
94
}
95
96
if err := ks.Put(".foo", k1); err != nil {
misc/completion/ipfs-completion.bash
+3
-3
@@ -172,9 +172,9 @@ _ipfs_dag_get()
172
_ipfs_dag_put()
173
{
174
if [[ ${prev} == "--format" ]] ; then
175
- _ipfs_comp "cbor placeholder1" # TODO: a) Which format more then cbor is valid? b) Solve autocomplete bug for "="
175
+ _ipfs_comp "cbor placeholder1" # TODO: a) Which format more than cbor is valid? b) Solve autocomplete bug for "="
176
elif [[ ${prev} == "--input-enc" ]] ; then
177
- _ipfs_comp "json placeholder1" # TODO: a) Which format more then json is valid? b) Solve autocomplete bug for "="
177
+ _ipfs_comp "json placeholder1" # TODO: a) Which format more than json is valid? b) Solve autocomplete bug for "="
178
elif [[ ${word} == -* ]] ; then
179
_ipfs_comp "--format= --input-enc= --help"
180
else
@@ -227,7 +227,7 @@ _ipfs_diag_cmds()
227
if [[ ${prev} == "clear" ]] ; then
228
return 0
229
elif [[ ${prev} =~ ^-?[0-9]+$ ]] ; then
230
- _ipfs_comp "ns us µs ms s m h" # TODO: Trigger with out space, eg. "ipfs diag set-time 10ns" not "... set-time 10 ns"
230
+ _ipfs_comp "ns us µs ms s m h" # TODO: Trigger without space, eg. "ipfs diag set-time 10ns" not "... set-time 10 ns"
231
elif [[ ${prev} == "set-time" ]] ; then
232
_ipfs_help_only
233
elif [[ ${word} == -* ]] ; then
namesys/namesys.go
+1
-1
@@ -45,7 +45,7 @@ func NewNameSystem(r routing.ValueStore, ds ds.Datastore, cachesize int) NameSys
45
cache, _ = lru.New(cachesize)
46
}
47
48
- // Prewarm namesys cache with static records for deteministic tests and debugging.
48
+ // Prewarm namesys cache with static records for deterministic tests and debugging.
49
// Useful for testing things like DNSLink without real DNS lookup.
50
// Example:
51
// IPFS_NS_MAP="dnslink-test.example.com:/ipfs/bafkreicysg23kiwv34eg2d7qweipxwosdo2py4ldv42nbauguluen5v6am"
namesys/republisher/repub_test.go
+1
-1
@@ -92,7 +92,7 @@ func TestRepublish(t *testing.T) {
92
93
// The republishers that are contained within the nodes have their timeout set
94
// to 12 hours. Instead of trying to tweak those, we're just going to pretend
95
- // they dont exist and make our own.
95
+ // they don't exist and make our own.
96
repub := NewRepublisher(rp, publisher.Repo.Datastore(), publisher.PrivateKey, publisher.Repo.Keystore())
97
repub.Interval = time.Second
98
repub.RecordLifetime = time.Second * 5
plugin/plugins/gen_main.sh
+1
-1
@@ -1,6 +1,6 @@
1
#!/usr/bin/env bash
2
3
-dir=${1:?first paramater with dir to work in is required}
3
+dir=${1:?first parameter with dir to work in is required}
4
pkg=${2:?second parameter with full name of the package is required}
5
main_pkg="$dir/main"
6
repo/fsrepo/migrations/migrations.go
+2
-2
@@ -116,7 +116,7 @@ func verifyMigrationSupportsVersion(fsrbin string, vn int) error {
116
return nil
117
}
118
119
- return fmt.Errorf("migrations binary doesnt support version %d: %s", vn, fsrbin)
119
+ return fmt.Errorf("migrations binary doesn't support version %d: %s", vn, fsrbin)
120
}
121
122
func migrationsVersion(bin string) (int, error) {
@@ -163,7 +163,7 @@ func GetLatestVersion(ipfspath, dist string) (string, error) {
163
}
164
}
165
if latest == "" {
166
- return "", fmt.Errorf("couldnt find a non dev version in the list")
166
+ return "", fmt.Errorf("couldn't find a non dev version in the list")
167
}
168
return vs[len(vs)-1], nil
169
}
repo/onlyone.go
+1
-1
@@ -12,7 +12,7 @@ type OnlyOne struct {
12
}
13
14
// Open a Repo identified by key. If Repo is not already open, the
15
-// open function is called, and the result is remember for further
15
+// open function is called, and the result is remembered for further
16
// use.
17
//
18
// Key must be comparable, or Open will panic. Make sure to pick keys
test/3nodetest/run-test-on-img.sh
+1
-1
@@ -9,7 +9,7 @@ fi
9
# {data, server, client, bootstrap}
10
tag=zaqwsx_ipfs-test-img
11
12
-# could use set -v, but i dont want to see the comments...
12
+# could use set -v, but i don't want to see the comments...
13
14
img=$(docker images | grep $1 | awk '{print $3}')
15
echo "using docker image: $img ($1)"
test/ipfs-test-lib.sh
+1
-1
@@ -9,7 +9,7 @@ shellquote() {
9
_space=''
10
for _arg
11
do
12
- # On Mac OS, sed adds a newline character.
12
+ # On macOS, sed adds a newline character.
13
# With a printf wrapper the extra newline is removed.
14
printf "$_space'%s'" "$(printf "%s" "$_arg" | sed -e "s/'/'\\\\''/g;")"
15
_space=' '
test/sharness/README.md
+2
-2
@@ -107,7 +107,7 @@ test_expect_success "'ipfs add --help' succeeds" '
107
108
# other tests here...
109
110
-# dont forget to kill the daemon!!
110
+# don't forget to kill the daemon!!
111
test_kill_ipfs_daemon
112
```
113
@@ -126,6 +126,6 @@ test_mount_ipfs
126
127
# tests mounted here
128
129
-# dont forget to kill the daemon!!
129
+# don't forget to kill the daemon!!
130
test_kill_ipfs_daemon
131
```
test/sharness/lib/iptb-lib.sh
+1
-1
@@ -44,7 +44,7 @@ startup_cluster() {
44
'
45
fi
46
47
- test_expect_success "connect nodes to eachother" '
47
+ test_expect_success "connect nodes to each other" '
48
iptb connect [1-$bound] 0
49
'
50
test/sharness/t0010-basic-commands.sh
+4
-4
@@ -67,9 +67,9 @@ test_expect_success "All sub-commands accept help" '
67
while read -r cmd
68
do
69
${cmd:0:4} help ${cmd:5} >/dev/null ||
70
- { echo "$cmd doesnt accept --help"; echo 1 > fail; }
70
+ { echo "$cmd does not accept --help"; echo 1 > fail; }
71
echo stuff | $cmd --help >/dev/null ||
72
- { echo "$cmd doesnt accept --help when using stdin"; echo 1 > fail; }
72
+ { echo "$cmd does not accept --help when using stdin"; echo 1 > fail; }
73
done <commands.txt
74
75
if [ $(cat fail) = 1 ]; then
@@ -82,9 +82,9 @@ test_expect_success "All commands accept --help" '
82
while read -r cmd
83
do
84
$cmd --help >/dev/null ||
85
- { echo "$cmd doesnt accept --help"; echo 1 > fail; }
85
+ { echo "$cmd does not accept --help"; echo 1 > fail; }
86
echo stuff | $cmd --help >/dev/null ||
87
- { echo "$cmd doesnt accept --help when using stdin"; echo 1 > fail; }
87
+ { echo "$cmd does not accept --help when using stdin"; echo 1 > fail; }
88
done <commands.txt
89
90
if [ $(cat fail) = 1 ]; then
test/sharness/t0020-init.sh
+2
-2
@@ -8,7 +8,7 @@ test_description="Test init command"
8
9
. lib/test-lib.sh
10
11
-# test that ipfs fails to init if IPFS_PATH isnt writeable
11
+# test that ipfs fails to init if IPFS_PATH isn't writeable
12
test_expect_success "create dir and change perms succeeds" '
13
export IPFS_PATH="$(pwd)/.badipfs" &&
14
mkdir "$IPFS_PATH" &&
@@ -114,7 +114,7 @@ test_expect_success "'ipfs init --empty-repo' output looks good" '
114
test_cmp expected actual_init
115
'
116
117
-test_expect_success "Welcome readme doesn't exists" '
117
+test_expect_success "Welcome readme doesn't exist" '
118
test_must_fail ipfs cat /ipfs/$HASH_WELCOME_DOCS/readme
119
'
120
test/sharness/t0030-mount.sh
+1
-1
@@ -8,7 +8,7 @@ test_description="Test mount command"
8
9
. lib/test-lib.sh
10
11
-# if in travis CI, dont test mount (no fuse)
11
+# if in travis CI, don't test mount (no fuse)
12
if ! test_have_prereq FUSE; then
13
skip_all='skipping mount tests, fuse not available'
14
test/sharness/t0031-mount-publish.sh
+1
-1
@@ -5,7 +5,7 @@ test_description="Test mount command in conjunction with publishing"
5
# imports
6
. lib/test-lib.sh
7
8
-# if in travis CI, dont test mount (no fuse)
8
+# if in travis CI, don't test mount (no fuse)
9
if ! test_have_prereq FUSE; then
10
skip_all='skipping mount tests, fuse not available'
11
test/sharness/t0040-add-and-cat.sh
+4
-4
@@ -13,7 +13,7 @@ test_add_cat_file() {
13
ipfs add --help 2> add_help_err1 > /dev/null
14
'
15
16
- test_expect_success "stdin reading message doesnt show up" '
16
+ test_expect_success "stdin reading message doesn't show up" '
17
test_expect_code 1 grep "ipfs: Reading from" add_help_err1 &&
18
test_expect_code 1 grep "send Ctrl-d to stop." add_help_err1
19
'
@@ -22,7 +22,7 @@ test_add_cat_file() {
22
ipfs help add 2> add_help_err2 > /dev/null
23
'
24
25
- test_expect_success "stdin reading message doesnt show up" '
25
+ test_expect_success "stdin reading message doesn't show up" '
26
test_expect_code 1 grep "ipfs: Reading from" add_help_err2 &&
27
test_expect_code 1 grep "send Ctrl-d to stop." add_help_err2
28
'
@@ -83,7 +83,7 @@ test_add_cat_file() {
83
test_cmp expected actual
84
'
85
86
- test_expect_success "ipfs cat from negitive offset should fail" '
86
+ test_expect_success "ipfs cat from negative offset should fail" '
87
test_expect_code 1 ipfs cat --offset -102 "$HASH" > actual
88
'
89
@@ -132,7 +132,7 @@ test_add_cat_file() {
132
test_cmp expected actual
133
'
134
135
- test_expect_success "ipfs cat with negitive length should fail" '
135
+ test_expect_success "ipfs cat with negative length should fail" '
136
test_expect_code 1 ipfs cat --length -102 "$HASH" > actual
137
'
138
test/sharness/t0050-block.sh
+1
-1
@@ -228,7 +228,7 @@ test_expect_success "can read block with different hash" '
228
# Misc tests
229
#
230
231
-test_expect_success "'ipfs block stat' with nothing from stdin doesnt crash" '
231
+test_expect_success "'ipfs block stat' with nothing from stdin doesn't crash" '
232
test_expect_code 1 ipfs block stat < /dev/null 2> stat_out
233
'
234
test/sharness/t0051-object.sh
+1
-1
@@ -206,7 +206,7 @@ test_object_cmd() {
206
test_cmp expected actual
207
'
208
209
- test_expect_success "after gc, objects still acessible" '
209
+ test_expect_success "after gc, objects still accessible" '
210
ipfs repo gc > /dev/null &&
211
ipfs refs -r --timeout=2s $HASH > /dev/null
212
'
test/sharness/t0053-dag.sh
+3
-3
@@ -97,7 +97,7 @@ test_dag_cmd() {
97
ipfs pin add $EXPHASH
98
'
99
100
- test_expect_success "after gc, objects still acessible" '
100
+ test_expect_success "after gc, objects still accessible" '
101
ipfs repo gc > /dev/null &&
102
ipfs refs -r --timeout=2s $EXPHASH > /dev/null
103
'
@@ -110,7 +110,7 @@ test_dag_cmd() {
110
grep "{\"/\":\"" ipld_obj_out > /dev/null
111
'
112
113
- test_expect_success "retreived object hashes back correctly" '
113
+ test_expect_success "retrieved object hashes back correctly" '
114
IPLDHASH2=$(cat ipld_obj_out | ipfs dag put) &&
115
test "$IPLDHASH" = "$IPLDHASH2"
116
'
@@ -153,7 +153,7 @@ test_dag_cmd() {
153
PINHASH=$(printf {\"foo\":\"bar\"} | ipfs dag put --pin=true)
154
'
155
156
- test_expect_success "after gc, objects still acessible" '
156
+ test_expect_success "after gc, objects still accessible" '
157
ipfs repo gc > /dev/null &&
158
ipfs refs -r --timeout=2s $PINHASH > /dev/null
159
'
test/sharness/t0060-daemon.sh
+1
-1
@@ -184,7 +184,7 @@ test_expect_success "daemon actually can handle 2048 file descriptors" '
184
hang-fds -hold=2s 2000 '$API_MADDR' > /dev/null
185
'
186
187
-test_expect_success "daemon didnt throw any errors" '
187
+test_expect_success "daemon didn't throw any errors" '
188
test_expect_code 1 grep "too many open files" daemon_err
189
'
190
test/sharness/t0062-daemon-api.sh
+1
-1
@@ -66,7 +66,7 @@ test_client_suite() {
66
67
# first, test things without daemon, without /api file
68
# with no daemon, everything should fail
69
-# (using unreachable because API_MADDR doesnt get set until daemon start)
69
+# (using unreachable because API_MADDR doesn't get set until daemon start)
70
test_client_suite "(daemon off, no --api, no /api file)" false false "$api_unreachable" "$api_other"
71
72
test/sharness/t0080-repo.sh
+1
-1
@@ -33,7 +33,7 @@ test_expect_success "'ipfs repo gc' looks good (patch root)" '
33
grep -v "removed $HASH" gc_out_actual
34
'
35
36
-test_expect_success "'ipfs repo gc' doesnt remove file" '
36
+test_expect_success "'ipfs repo gc' doesn't remove file" '
37
ipfs cat "$HASH" >out &&
38
test_cmp out afile
39
'
test/sharness/t0087-repo-robust-gc.sh
+1
-1
@@ -35,7 +35,7 @@ test_gc_robust_part1() {
35
test_must_fail ipfs cat $HASH1
36
'
37
38
- test_expect_success "'ipfs repo gc' should still be be fine" '
38
+ test_expect_success "'ipfs repo gc' should still be fine" '
39
ipfs repo gc
40
'
41
test/sharness/t0090-get.sh
+1
-1
@@ -156,7 +156,7 @@ test_get_cmd() {
156
}
157
158
test_get_fail() {
159
- test_expect_success "create an object that has unresolveable links" '
159
+ test_expect_success "create an object that has unresolvable links" '
160
cat <<-\EOF >bad_object &&
161
{ "Links": [ { "Name": "foo", "Hash": "QmZzaC6ydNXiR65W8VjGA73ET9MZ6VFAqUT1ngYMXcpihn", "Size": 1897 }, { "Name": "bar", "Hash": "Qmd4mG6pDFDmDTn6p3hX1srP8qTbkyXKj5yjpEsiHDX3u8", "Size": 56 }, { "Name": "baz", "Hash": "QmUTjwRnG28dSrFFVTYgbr6LiDLsBmRr2SaUSTGheK2YqG", "Size": 24266 } ], "Data": "\b\u0001" }
162
EOF
test/sharness/t0110-gateway.sh
+2
-2
@@ -64,7 +64,7 @@ test_expect_success "GET IPFS directory file output looks good" '
64
test_cmp dir/test actual
65
'
66
67
-test_expect_success "GET IPFS non existent file returns code expected (404)" '
67
+test_expect_success "GET IPFS nonexistent file returns code expected (404)" '
68
test_curl_resp_http_code "http://127.0.0.1:$port/ipfs/$HASH2/pleaseDontAddMe" "HTTP/1.1 404 Not Found"
69
'
70
@@ -250,7 +250,7 @@ test_expect_success "try fetching not present ipns key from node 0" '
250
test_expect_code 22 curl -f "http://127.0.0.1:$GWPORT/ipns/$PEERID_1"
251
'
252
253
-test_expect_success "try fetching present key from from node 0" '
253
+test_expect_success "try fetching present key from node 0" '
254
BAR=$(echo "bar" | ipfsi 0 add -Q) &&
255
curl -f "http://127.0.0.1:$GWPORT/ipfs/$BAR"
256
'
test/sharness/t0114-gateway-subdomains.sh
+1
-1
@@ -67,7 +67,7 @@ test_localhost_gateway_response_should_contain() {
67
"
68
}
69
70
-# Helper that checks gateway resonse for specific hostname in Host header
70
+# Helper that checks gateway response for specific hostname in Host header
71
test_hostname_gateway_response_should_contain() {
72
local label="$1"
73
local hostname="$2"
test/sharness/t0131-multinode-client-routing.sh
+1
-1
@@ -60,7 +60,7 @@ test_expect_success "add a file on a node in client mode" '
60
FILE_HASH=$(ipfsi 8 add -q filea)
61
'
62
63
-test_expect_success "retrieve that file on a client mode node" '
63
+test_expect_success "retrieve that file on a node in client mode" '
64
check_file_fetch 9 $FILE_HASH filea
65
'
66
test/sharness/t0140-swarm.sh
+1
-1
@@ -40,7 +40,7 @@ test_expect_success "output looks good" '
40
41
addr="/ip4/127.0.0.1/tcp/9898/p2p/QmUWKoHbjsqsSMesRC2Zoscs8edyFz6F77auBB1YBBhgpX"
42
43
-test_expect_success "cant trigger a dial backoff with swarm connect" '
43
+test_expect_success "can't trigger a dial backoff with swarm connect" '
44
test_expect_code 1 ipfs swarm connect $addr 2> connect_out
45
test_expect_code 1 ipfs swarm connect $addr 2>> connect_out
46
test_expect_code 1 ipfs swarm connect $addr 2>> connect_out
test/sharness/t0183-namesys-pubsub.sh
+1
-1
@@ -41,7 +41,7 @@ test_expect_success 'check subscriptions' '
41
test_cmp expected subs2
42
'
43
44
-test_expect_success 'add an obect on publisher node' '
44
+test_expect_success 'add an object on publisher node' '
45
echo "ipns is super fun" > file &&
46
HASH_FILE=$(ipfsi 0 add -q file)
47
'
test/sharness/t0250-files-api.sh
+1
-1
@@ -445,7 +445,7 @@ test_files_api() {
445
test_cmp filehash_expected filehash
446
'
447
448
- test_expect_success "cant write to negative offset $EXTRA" '
448
+ test_expect_success "can't write to negative offset $EXTRA" '
449
test_expect_code 1 ipfs files write $ARGS $RAW_LEAVES --offset -1 /cats/ipfs < output
450
'
451
test/sharness/t0270-filestore.sh
+1
-1
@@ -48,7 +48,7 @@ test_filestore_adds() {
48
49
assert_repo_size_less_than 1000000
50
51
- test_expect_success "normal add with fscache doesnt duplicate data" '
51
+ test_expect_success "normal add with fscache doesn't duplicate data" '
52
ipfs add --raw-leaves --fscache -r -q somedir > /dev/null
53
'
54
test/sharness/t0272-urlstore.sh
+2
-2
@@ -125,7 +125,7 @@ EOF
125
test_cmp verify_expect_2 verify_actual_2
126
'
127
128
- test_expect_success "files can not be retrieved via the urlstore" '
128
+ test_expect_success "files cannot be retrieved via the urlstore" '
129
test_must_fail ipfs cat $HASH1 > /dev/null &&
130
test_must_fail ipfs cat $HASH2 > /dev/null
131
'
@@ -164,7 +164,7 @@ EOF
164
165
test_kill_ipfs_daemon
166
167
- test_expect_success "files can not be retrieved via the urlstore" '
167
+ test_expect_success "files cannot be retrieved via the urlstore" '
168
test_must_fail ipfs cat $HASH1 > /dev/null &&
169
test_must_fail ipfs cat $HASH2 > /dev/null &&
170
test_must_fail ipfs cat $HASH3 > /dev/null
test/sharness/t0410-api-add.sh
+1
-1
@@ -10,7 +10,7 @@ test_description="Test API add command"
10
11
test_init_ipfs
12
13
-# Verify that that API add command returns size
13
+# Verify that the API add command returns size
14
15
test_launch_ipfs_daemon
16
test_expect_success "API Add response includes size field" '
test/sharness/t0600-issues-and-regressions-online.sh
+1
-1
@@ -19,7 +19,7 @@ test_expect_success "ipfs refs local over HTTP API returns NDJOSN not flat - #28
19
curl -X POST "http://$API_ADDR/api/v0/refs/local" | grep "Ref" | grep "Err"
20
'
21
22
-test_expect_success "args expecting stdin dont crash when not given" '
22
+test_expect_success "args expecting stdin don't crash when not given" '
23
curl -X POST "$API_ADDR/api/v0/bootstrap/add" > result
24
'
25
test/sharness_test_coverage_helper.sh
+1
-1
@@ -170,7 +170,7 @@ do
170
done
171
172
# The following will allow us to check that
173
-# we are properly excuding enough stuff using:
173
+# we are properly excluding enough stuff using:
174
# diff -u ipfs_cmd_result.txt cmd_found.txt
175
log "Get all the line commands that matched"
176
CMD_FOUND="$TMPDIR/cmd_found.txt"
thirdparty/README.md
+1
-1
@@ -1,5 +1,5 @@
1
thirdparty consists of Golang packages that contain no go-ipfs dependencies and
2
may be vendored ipfs/go-ipfs at a later date.
3
4
-packages in under this directory _must not_ import packages under
4
+packages under this directory _must not_ import packages under
5
`ipfs/go-ipfs` that are not also under `thirdparty`.
thirdparty/notifier/notifier.go
+1
-1
@@ -1,5 +1,5 @@
1
// Package notifier provides a simple notification dispatcher
2
-// meant to be embedded in larger structres who wish to allow
2
+// meant to be embedded in larger structures who wish to allow
3
// clients to sign up for event notifications.
4
package notifier
5