misc: Fix a few typos
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
Łukasz Magiera committed
Mar 19, 2018 at 03:41 UTC
b290286dd792ba6286fea9b2bde481e4f79f0254
39 files changed
+75
-76
CHANGELOG.md
+11
-11
@@ -130,7 +130,7 @@ remove them before updating.
130
- Update badgerds to fix i386 windows build ([ipfs/go-ipfs#4464](https://github.com/ipfs/go-ipfs/pull/4464))
131
- Only construct bitswap event loggable if necessary ([ipfs/go-ipfs#4533](https://github.com/ipfs/go-ipfs/pull/4533))
132
- Ensure that flush on the mfs root flushes its directory ([ipfs/go-ipfs#4509](https://github.com/ipfs/go-ipfs/pull/4509))
133
- - Fix defered unlock of pin lock in AddR ([ipfs/go-ipfs#4562](https://github.com/ipfs/go-ipfs/pull/4562))
133
+ - Fix deferred unlock of pin lock in AddR ([ipfs/go-ipfs#4562](https://github.com/ipfs/go-ipfs/pull/4562))
134
- Fix iOS builds ([ipfs/go-ipfs#4610](https://github.com/ipfs/go-ipfs/pull/4610))
135
- Calling repo gc now frees up space with badgerds ([ipfs/go-ipfs#4578](https://github.com/ipfs/go-ipfs/pull/4578))
136
- Fix leak in bitswap sessions shutdown ([ipfs/go-ipfs#4658](https://github.com/ipfs/go-ipfs/pull/4658))
@@ -282,7 +282,7 @@ wantlist updates to every connected bitswap partner, as well as searching the
282
DHT for providers less frequently. In future releases we will migrate over more
283
ipfs commands to take advantage of bitswap sessions. As nodes update to this
284
and future versions, expect to see idle bandwidth usage on the ipfs network
285
-go down noticably.
285
+go down noticeably.
286
287
The never ending effort to reduce resource consumption had a few important
288
updates this release. First, the bitswap sessions changes discussed above will
@@ -332,7 +332,7 @@ You can read more on this topic in [Plugin docs](docs/plugins.md)
332
333
In order to simplify its integration with fs-repo-migrations, we've switched
334
the ipfs/go-ipfs docker image from a musl base to a glibc base. For most users
335
-this will not be noticable, but if you've been building your own images based
335
+this will not be noticeable, but if you've been building your own images based
336
off this image, you'll have to update your dockerfile. We recommend a
337
multi-stage dockerfile, where the build stage is based off of a regular Debian or
338
other glibc-based image, and the assembly stage is based off of the ipfs/go-ipfs
@@ -1010,14 +1010,14 @@ This is the first Release Candidate. Unless there are vulnerabilities or regress
1010
1011
### 0.4.2 - 2016-05-17
1012
1013
-This is a patch release which fixes perfomance and networking bugs in go-libp2p,
1013
+This is a patch release which fixes performance and networking bugs in go-libp2p,
1014
You should see improvements in CPU and RAM usage, as well as speed of object lookups.
1015
There are also a few other nice improvements.
1016
1017
* Notable Fixes
1018
* Set a deadline for dialing attempts. This prevents a node from accumulating
1019
failed connections. (@whyrusleeping)
1020
- * Avoid unneccessary string/byte conversions in go-multihash. (@whyrusleeping)
1020
+ * Avoid unnecessary string/byte conversions in go-multihash. (@whyrusleeping)
1021
* Fix a deadlock around the yamux stream muxer. (@whyrusleeping)
1022
* Fix a bug that left channels open, causing hangs. (@whyrusleeping)
1023
* Fix a bug around yamux which caused connection hangs. (@whyrusleeping)
@@ -1077,7 +1077,7 @@ insignificant) features. The primary reason for this release is the listener
1077
hang bugfix that was shipped in the 0.4.0 release.
1078
1079
* Features
1080
- * implementated ipfs object diff (@whyrusleeping)
1080
+ * implemented ipfs object diff (@whyrusleeping)
1081
* allow promises (used in get, refs) to fail (@whyrusleeping)
1082
1083
* Tool changes
@@ -1166,7 +1166,7 @@ on the networking layer.
1166
* General
1167
* Add support for HTTP OPTIONS requests. (@lidel)
1168
* Add `ipfs diag cmds` to view active API requests (@whyrusleeping)
1169
- * Add an `IPFS_LOW_MEM` environment veriable which relaxes Bitswap's memory usage. (@whyrusleeping)
1169
+ * Add an `IPFS_LOW_MEM` environment variable which relaxes Bitswap's memory usage. (@whyrusleeping)
1170
* The Docker image now lives at `ipfs/go-ipfs` and has been completely reworked. (@lgierth)
1171
* Security fixes
1172
* The gateway path prefix added in v0.3.10 was vulnerable to cross-site
@@ -1351,7 +1351,7 @@ in the future, it will be enabled by default.
1351
1352
This patch update includes a good number of bugfixes, notably, it fixes
1353
builds on windows, and puts newlines between streaming json objects for a
1354
-proper nsjon format.
1354
+proper ndjson format.
1355
1356
* Features
1357
* Writable gateway enabled again (@cryptix)
@@ -1359,7 +1359,7 @@ proper nsjon format.
1359
* Bugfixes
1360
* fix windows builds (@whyrusleeping)
1361
* content type on command responses default to text (@whyrusleeping)
1362
- * add check to makefile to ensure windows builds dont fail silently (@whyrusleeping)
1362
+ * add check to makefile to ensure windows builds don't fail silently (@whyrusleeping)
1363
* put newlines between streaming json output objects (@whyrusleeping)
1364
* fix streaming output to flush per write (@whyrusleeping)
1365
* purposely fail builds pre go1.5 (@whyrusleeping)
@@ -1603,13 +1603,13 @@ This patch update fixes various issues, in particular:
1603
* ipns resolution timeout bug fix by @whyrusleeping
1604
* new cluster tests with iptb by @whyrusleeping
1605
* fix log callstack printing bug by @whyrusleeping
1606
-* document bash completiong by @dylanPowers
1606
+* document bash completion by @dylanPowers
1607
1608
### 0.3.2 - 2015-04-22
1609
1610
This patch update implements multicast dns as well as fxing a few test issues.
1611
1612
-* implment mdns peer discovery @whyrusleeping
1612
+* implement mdns peer discovery @whyrusleeping
1613
* fix mounting issues in sharness tests @chriscool
1614
1615
### 0.3.1 - 2015-04-21
README.md
+1
-1
@@ -317,7 +317,7 @@ Please direct general questions and help requests to our
317
[forum](https://discuss.ipfs.io) or our IRC channel (freenode #ipfs).
318
319
If you believe you've found a bug, check the [issues list](https://github.com/ipfs/go-ipfs/issues)
320
-and, if you dont see your problem there, either come talk to us on IRC (freenode #ipfs) or
320
+and, if you don't see your problem there, either come talk to us on IRC (freenode #ipfs) or
321
file an issue of your own!
322
323
## Contributing
bin/dist_get
+3
-3
@@ -9,7 +9,7 @@ have_binary() {
9
type "$1" > /dev/null 2> /dev/null
10
}
11
12
-check_writeable() {
12
+check_writable() {
13
printf "" > "$1" && rm "$1"
14
}
15
@@ -39,7 +39,7 @@ download() {
39
40
test "$#" -eq "2" || die "download requires exactly two arguments, was given $@"
41
42
- if ! check_writeable "$dl_output"; then
42
+ if ! check_writable "$dl_output"; then
43
die "download error: cannot write to $dl_output"
44
fi
45
@@ -65,7 +65,7 @@ unarchive() {
65
fi
66
ua_outfile="$ua_outfile$ua_binpostfix"
67
68
- if ! check_writeable "$ua_outfile"; then
68
+ if ! check_writable "$ua_outfile"; then
69
die "unarchive error: cannot write to $ua_outfile"
70
fi
71
cmd/ipfs/init.go
+3
-3
@@ -138,7 +138,7 @@ func doInit(out io.Writer, repoRoot string, empty bool, nBitsForKeypair int, con
138
return err
139
}
140
141
- if err := checkWriteable(repoRoot); err != nil {
141
+ if err := checkWritable(repoRoot); err != nil {
142
return err
143
}
144
@@ -178,7 +178,7 @@ func doInit(out io.Writer, repoRoot string, empty bool, nBitsForKeypair int, con
178
return initializeIpnsKeyspace(repoRoot)
179
}
180
181
-func checkWriteable(dir string) error {
181
+func checkWritable(dir string) error {
182
_, err := os.Stat(dir)
183
if err == nil {
184
// dir exists, make sure we can write to it
@@ -195,7 +195,7 @@ func checkWriteable(dir string) error {
195
}
196
197
if os.IsNotExist(err) {
198
- // dir doesnt exist, check that we can create it
198
+ // dir doesn't exist, check that we can create it
199
return os.Mkdir(dir, 0775)
200
}
201
cmd/ipfs/main.go
+3
-3
@@ -101,7 +101,7 @@ func mainRet() int {
101
}
102
}
103
104
- // output depends on excecutable name passed in os.Args
104
+ // output depends on executable name passed in os.Args
105
// so we need to make sure it's stable
106
os.Args[0] = "ipfs"
107
@@ -235,7 +235,7 @@ func commandDetails(path []string, root *cmds.Command) (*cmdDetails, error) {
235
return &details, nil
236
}
237
238
-// commandShouldRunOnDaemon determines, from commmand details, whether a
238
+// commandShouldRunOnDaemon determines, from command details, whether a
239
// command ought to be executed on an ipfs daemon.
240
//
241
// It returns a client if the command should be executed on a daemon and nil if
@@ -257,7 +257,7 @@ func commandShouldRunOnDaemon(details cmdDetails, req *cmds.Request, root *cmds.
257
}
258
259
// at this point need to know whether api is running. we defer
260
- // to this point so that we dont check unnecessarily
260
+ // to this point so that we don't check unnecessarily
261
262
// did user specify an api to use for this command?
263
apiAddrStr, _ := req.Options[coreCmds.ApiOption].(string)
cmd/ipfs/util/ulimit_freebsd.go
+2
-2
@@ -9,7 +9,7 @@ import (
9
func init() {
10
supportsFDManagement = true
11
getLimit = freebsdGetLimit
12
- setLimit = freebdsSetLimit
12
+ setLimit = freebsdSetLimit
13
}
14
15
func freebsdGetLimit() (int64, int64, error) {
@@ -18,7 +18,7 @@ func freebsdGetLimit() (int64, int64, error) {
18
return rlimit.Cur, rlimit.Max, err
19
}
20
21
-func freebdsSetLimit(soft int64, max int64) error {
21
+func freebsdSetLimit(soft int64, max int64) error {
22
rlimit := unix.Rlimit{
23
Cur: soft,
24
Max: max,
cmd/seccat/seccat.go
+1
-1
@@ -29,7 +29,7 @@ import (
29
var verbose = false
30
31
// Usage prints out the usage of this module.
32
-// Assumes flags use go stdlib flag pacakage.
32
+// Assumes flags use go stdlib flag package.
33
var Usage = func() {
34
text := `seccat - secure netcat in Go
35
commands/request.go
+3
-3
@@ -26,8 +26,8 @@ type Context struct {
26
ConstructNode func() (*core.IpfsNode, error)
27
}
28
29
-// GetConfig returns the config of the current Command exection
30
-// context. It may load it with the providied function.
29
+// GetConfig returns the config of the current Command execution
30
+// context. It may load it with the provided function.
31
func (c *Context) GetConfig() (*config.Config, error) {
32
var err error
33
if c.config == nil {
@@ -39,7 +39,7 @@ func (c *Context) GetConfig() (*config.Config, error) {
39
return c.config, err
40
}
41
42
-// GetNode returns the node of the current Command exection
42
+// GetNode returns the node of the current Command execution
43
// context. It may construct it with the provided function.
44
func (c *Context) GetNode() (*core.IpfsNode, error) {
45
var err error
contribute.md
+1
-1
@@ -29,7 +29,7 @@ Please look and conform to our [Go Contribution Guidelines](https://github.com/i
29
30
All commits in a PR must pass tests. If they don't, fix the commits and/or [squash them](https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Squashing-Commits) so that they do pass the tests. This should be done so that we can use git-bisect easily.
31
32
-We use CI tests which run when you push to your branch. To run the tests locally, you can run any of these: `make build`, `make install`, `make test`, `go test ./...`, depending on what youre looking to do. Generally `go test ./...` is your best bet.
32
+We use CI tests which run when you push to your branch. To run the tests locally, you can run any of these: `make build`, `make install`, `make test`, `go test ./...`, depending on what you're looking to do. Generally `go test ./...` is your best bet.
33
34
### Branch Names
35
core/builder.go
+1
-1
@@ -229,7 +229,7 @@ func setupNode(ctx context.Context, n *IpfsNode, cfg *BuildCfg) error {
229
internalDag := dag.NewDAGService(bserv.New(n.Blockstore, offline.Exchange(n.Blockstore)))
230
n.Pinning, err = pin.LoadPinner(n.Repo.Datastore(), n.DAG, internalDag)
231
if err != nil {
232
- // TODO: we should move towards only running 'NewPinner' explicity on
232
+ // TODO: we should move towards only running 'NewPinner' explicitly on
233
// node init instead of implicitly here as a result of the pinner keys
234
// not being found in the datastore.
235
// this is kinda sketchy and could cause data loss
core/commands/add.go
+1
-1
@@ -24,7 +24,7 @@ import (
24
cmds "gx/ipfs/QmfAkMSt9Fwzk48QDJecPcwCUjnf2uG7MLnmCGTp4C6ouL/go-ipfs-cmds"
25
)
26
27
-// ErrDepthLimitExceeded indicates that the max depth has been exceded.
27
+// ErrDepthLimitExceeded indicates that the max depth has been exceeded.
28
var ErrDepthLimitExceeded = fmt.Errorf("depth limit exceeded")
29
30
const (
core/commands/block.go
+1
-1
@@ -271,7 +271,7 @@ var blockRmCmd = &cmds.Command{
271
Tagline: "Remove IPFS block(s).",
272
ShortDescription: `
273
'ipfs block rm' is a plumbing command for removing raw ipfs blocks.
274
-It takes a list of base58 encoded multihashs to remove.
274
+It takes a list of base58 encoded multihashes to remove.
275
`,
276
},
277
Arguments: []cmdkit.Argument{
core/commands/dag/dag.go
+1
-1
@@ -185,7 +185,7 @@ var DagGetCmd = &cmds.Command{
185
Helptext: cmdkit.HelpText{
186
Tagline: "Get a dag node from ipfs.",
187
ShortDescription: `
188
-'ipfs dag get' fetches a dag node from ipfs and prints it out in the specifed
188
+'ipfs dag get' fetches a dag node from ipfs and prints it out in the specified
189
format.
190
`,
191
},
core/commands/mount_unix.go
+2
-2
@@ -27,7 +27,7 @@ root will not be listable, as it is virtual. Access known paths directly.
27
You may have to create /ipfs and /ipns before using 'ipfs mount':
28
29
> sudo mkdir /ipfs /ipns
30
-> sudo chown ` + "`" + `whoami` + "`" + ` /ipfs /ipns
30
+> sudo chown $(whoami) /ipfs /ipns
31
> ipfs daemon &
32
> ipfs mount
33
`,
@@ -40,7 +40,7 @@ root will not be listable, as it is virtual. Access known paths directly.
40
You may have to create /ipfs and /ipns before using 'ipfs mount':
41
42
> sudo mkdir /ipfs /ipns
43
-> sudo chown ` + "`" + `whoami` + "`" + ` /ipfs /ipns
43
+> sudo chown $(whoami) /ipfs /ipns
44
> ipfs daemon &
45
> ipfs mount
46
core/commands/refs.go
+1
-1
@@ -98,7 +98,7 @@ NOTE: List all references recursively by using the flag '-r'.
98
}
99
if edges {
100
if format != "<dst>" {
101
- res.SetError(errors.New("using format arguement with edges is not allowed"),
101
+ res.SetError(errors.New("using format argument with edges is not allowed"),
102
cmdkit.ErrClient)
103
return
104
}
core/coreapi/coreapi.go
+1
-1
@@ -127,7 +127,7 @@ func ParsePath(p string) (coreiface.Path, error) {
127
return &path{path: pp}, nil
128
}
129
130
-// ParseCid parses the path from `c`, retruns the parsed path.
130
+// ParseCid parses the path from `c`, returns the parsed path.
131
func ParseCid(c *cid.Cid) coreiface.Path {
132
return &path{path: ipfspath.FromCid(c), cid: c, root: c}
133
}
core/coreapi/interface/options/pin.go
+2
-2
@@ -95,9 +95,9 @@ func (pinType) Indirect() PinLsOption {
95
96
// Recursive is an option for Pin.Add which specifies whether to pin an entire
97
// object tree or just one object. Default: true
98
-func (pinOpts) Recursive(recucsive bool) PinAddOption {
98
+func (pinOpts) Recursive(recursive bool) PinAddOption {
99
return func(settings *PinAddSettings) error {
100
- settings.Recursive = recucsive
100
+ settings.Recursive = recursive
101
return nil
102
}
103
}
core/coredag/dagtransl.go
+3
-3
@@ -59,11 +59,11 @@ func ParseInputs(ienc, format string, r io.Reader, mhType uint64, mhLen int) ([]
59
}
60
61
// AddParser adds DagParser under give input encoding and format
62
-func (iep InputEncParsers) AddParser(ienv, format string, f DagParser) {
63
- m, ok := iep[ienv]
62
+func (iep InputEncParsers) AddParser(ienc, format string, f DagParser) {
63
+ m, ok := iep[ienc]
64
if !ok {
65
m = make(FormatParsers)
66
- iep[ienv] = m
66
+ iep[ienc] = m
67
}
68
69
m[format] = f
core/corerepo/pinning.go
+1
-1
@@ -4,7 +4,7 @@ IPFS block services.
4
5
IPFS nodes will keep local copies of any object that have either been
6
added or requested locally. Not all of these objects are worth
7
-preserving forever though, so the node adminstrator can pin objects
7
+preserving forever though, so the node administrator can pin objects
8
they want to keep and unpin objects that they don't care about.
9
10
Garbage collection sweeps iterate through the local block store
core/pathresolver.go
+1
-1
@@ -28,7 +28,7 @@ func Resolve(ctx context.Context, nsys namesys.NameSystem, r *resolver.Resolver,
28
defer evt.Done()
29
// resolve ipns paths
30
31
- // TODO(cryptix): we sould be able to query the local cache for the path
31
+ // TODO(cryptix): we should be able to query the local cache for the path
32
if nsys == nil {
33
evt.Append(logging.LoggableMap{"error": ErrNoNamesys.Error()})
34
return nil, ErrNoNamesys
docs/experimental-features.md
+4
-4
@@ -47,7 +47,7 @@ run your daemon with the `--enable-pubsub-experiment` flag. Then use the
47
---
48
49
## Client mode DHT routing
50
-Allows the dht to be run in a mode that doesnt serve requests to the network,
50
+Allows the dht to be run in a mode that doesn't serve requests to the network,
51
saving bandwidth.
52
53
### State
@@ -183,7 +183,7 @@ and save it to `~/.ipfs/swarm.key` (If you are using a custom `$IPFS_PATH`, put
183
it in there instead).
184
185
When using this feature, you will not be able to connect to the default bootstrap
186
-nodes (Since we arent part of your private network) so you will need to set up
186
+nodes (Since we aren't part of your private network) so you will need to set up
187
your own bootstrap nodes.
188
189
First, to prevent your node from even trying to connect to the default bootstrap nodes, run:
@@ -215,7 +215,7 @@ configured, the daemon will fail to start.
215
---
216
217
## ipfs p2p
218
-Allows to tunnel TCP connections through Libp2p sterams
218
+Allows to tunnel TCP connections through Libp2p streams
219
220
### State
221
Experimental
@@ -277,7 +277,7 @@ In order to connect peers QmA and QmB through a relay node QmRelay:
277
- Both peers should connect to the relay:
278
`ipfs swarm connect /transport/address/ipfs/QmRelay`
279
- Peer QmA can then connect to peer QmB using the relay:
280
-`ipfs swarm connect /ipfs/QmRelay/p2p-cricuit/ipfs/QmB`
280
+`ipfs swarm connect /ipfs/QmRelay/p2p-circuit/ipfs/QmB`
281
282
Peers can also connect with an unspecific relay address, which will
283
try to dial through known relays:
docs/file-transfer.md
+3
-3
@@ -53,7 +53,7 @@ addresses (like the example below), then your nodes are online.
53
}
54
```
55
56
-Next, check to see if the nodes have a connection to eachother. You can do this
56
+Next, check to see if the nodes have a connection to each other. You can do this
57
by running `ipfs swarm peers` on one node, and checking for the other nodes
58
peer ID in the output. If the two nodes *are* connected, and the `ipfs get`
59
command is still hanging, then something unexpected is going on, and I
@@ -84,7 +84,7 @@ knowing that it needs to, the likely culprit is a bad NAT. When node B learns
84
that it needs to connect to node A, it checks the DHT for addresses for node A,
85
and then starts trying to connect to them. We can check those addresses by
86
running `ipfs dht findpeer <node A peerID>` on node B. This command should
87
-return a list of addresses for node A. If it doesnt return any addresses, then
87
+return a list of addresses for node A. If it doesn't return any addresses, then
88
you should try running the manual providing command from the previous steps.
89
Example output of addresses might look something like this:
90
@@ -98,7 +98,7 @@ In this case, we can see a localhost (127.0.0.1) address, a LAN address (the
98
192.168.*.* one) and another address. If this third address matches your
99
external IP, then the network knows a valid external address for your node. At
100
this point, its safe to assume that your node has a difficult to traverse NAT
101
-situation. If this is the case, you can try to enable upnp or NAT-PMP on the
101
+situation. If this is the case, you can try to enable UPnP or NAT-PMP on the
102
router of node A and retry the process. Otherwise, you can try manually
103
connecting node A to node B.
104
docs/releases.md
+3
-3
@@ -3,7 +3,7 @@
3
## Release Schedule
4
go-ipfs is on a six week release schedule. Following a release, there will be
5
five weeks for code of any type (features, bugfixes, etc) to be added. After
6
-the five weeks is up, a release canidate is tagged and only important bugfixes
6
+the five weeks is up, a release candidate is tagged and only important bugfixes
7
will be allowed up to release day.
8
9
## Release Candidate Checklist
@@ -15,8 +15,8 @@ will be allowed up to release day.
15
- you will have to manually adjust the gx version to 'rc'
16
17
## Pre-Release Checklist
18
-- [ ] before release, tag 'release canidate' for users to test against
19
- - if bugs are found/fixed, do another release canidate
18
+- [ ] before release, tag 'release candidate' for users to test against
19
+ - if bugs are found/fixed, do another release candidate
20
- [ ] all tests pass (no exceptions)
21
- [ ] run interop tests https://github.com/ipfs/interop#test-with-a-non-yet-released-version-of-go-ipfs
22
- [ ] webui works (for most definitions of 'works') - Test the multiple pages and verify that no visible errors are shown.
exchange/bitswap/README.md
+2
-2
@@ -4,7 +4,7 @@
4
Bitswap is the data trading module for ipfs, it manages requesting and sending
5
blocks to and from other peers in the network. Bitswap has two main jobs, the
6
first is to acquire blocks requested by the client from the network. The second
7
-is to judiciously send blocks in its posession to other peers who want them.
7
+is to judiciously send blocks in its possession to other peers who want them.
8
9
Bitswap is a message based protocol, as opposed to response-reply. All messages
10
contain wantlists, or blocks. Upon receiving a wantlist, a node should consider
@@ -20,7 +20,7 @@ another peer has a task in the peer request queue created for it. The peer
20
request queue is a priority queue that sorts available tasks by some metric,
21
currently, that metric is very simple and aims to fairly address the tasks
22
of each other peer. More advanced decision logic will be implemented in the
23
-future. Task workers pull tasks to be done off of the queue, retreive the block
23
+future. Task workers pull tasks to be done off of the queue, retrieve the block
24
to be sent, and send it off. The number of task workers is limited by a constant
25
factor.
26
exchange/bitswap/bitswap.go
+1
-1
@@ -295,7 +295,7 @@ func (bs *Bitswap) CancelWants(cids []*cid.Cid, ses uint64) {
295
bs.wm.CancelWants(context.Background(), cids, nil, ses)
296
}
297
298
-// HasBlock announces the existance of a block to this bitswap service. The
298
+// HasBlock announces the existence of a block to this bitswap service. The
299
// service will potentially notify its peers.
300
func (bs *Bitswap) HasBlock(blk blocks.Block) error {
301
return bs.receiveBlockFrom(blk, "")
exchange/bitswap/decision/ledger.go
+1
-1
@@ -24,7 +24,7 @@ type ledger struct {
24
// Partner is the remote Peer.
25
Partner peer.ID
26
27
- // Accounting tracks bytes sent and recieved.
27
+ // Accounting tracks bytes sent and received.
28
Accounting debtRatio
29
30
// lastExchange is the time of the last data exchange.
importer/helpers/dagbuilder.go
+1
-1
@@ -219,7 +219,7 @@ func (db *DagBuilderHelper) Maxlinks() int {
219
return db.maxlinks
220
}
221
222
-// Close has the DAGServce perform a batch Commit operation.
222
+// Close has the DAGService perform a batch Commit operation.
223
// It should be called at the end of the building process to make
224
// sure all data is persisted.
225
func (db *DagBuilderHelper) Close() error {
importer/trickle/trickledag.go
+2
-2
@@ -4,10 +4,10 @@
4
// as additional links.
5
//
6
// Each layer is a trickle sub-tree and is limited by an increasing
7
-// maxinum depth. Thus, the nodes first layer
7
+// maximum depth. Thus, the nodes first layer
8
// can only hold leaves (depth 1) but subsequent layers can grow deeper.
9
// By default, this module places 4 nodes per layer (that is, 4 subtrees
10
-// of the same maxinum depth before increasing it).
10
+// of the same maximum depth before increasing it).
11
//
12
// Trickle DAGs are very good for sequentially reading data, as the
13
// first data leaves are directly reachable from the root and those
merkledag/raw.go
+1
-2
@@ -14,8 +14,7 @@ type RawNode struct {
14
blocks.Block
15
}
16
17
-// NewRawNode creates a RawNode using the default sha2-256 hash
18
-// funcition.
17
+// NewRawNode creates a RawNode using the default sha2-256 hash function.
18
func NewRawNode(data []byte) *RawNode {
19
h := u.Hash(data)
20
c := cid.NewCidV1(cid.Raw, h)
namesys/pubsub.go
+2
-2
@@ -315,7 +315,7 @@ func (r *PubsubResolver) handleSubscription(sub *floodsub.Subscription, name str
315
316
err = r.receive(msg, name, pubk)
317
if err != nil {
318
- log.Warningf("PubsubResolve: error proessing update for %s: %s", name, err.Error())
318
+ log.Warningf("PubsubResolve: error processing update for %s: %s", name, err.Error())
319
}
320
}
321
}
@@ -369,7 +369,7 @@ func (r *PubsubResolver) receive(msg *floodsub.Message, name string, pubk ci.Pub
369
}
370
371
// rendezvous with peers in the name topic through provider records
372
-// Note: rendezbous/boostrap should really be handled by the pubsub implementation itself!
372
+// Note: rendezvous/boostrap should really be handled by the pubsub implementation itself!
373
func bootstrapPubsub(ctx context.Context, cr routing.ContentRouting, host p2phost.Host, name string) {
374
topic := "floodsub:" + name
375
hash := u.Hash([]byte(topic))
pin/pin.go
+1
-1
@@ -101,7 +101,7 @@ func StringToMode(s string) (Mode, bool) {
101
// A Pinner provides the necessary methods to keep track of Nodes which are
102
// to be kept locally, according to a pin mode. In practice, a Pinner is in
103
// in charge of keeping the list of items from the local storage that should
104
-// not be garbaged-collected.
104
+// not be garbage-collected.
105
type Pinner interface {
106
// IsPinned returns whether or not the given cid is pinned
107
// and an explanation of why its pinned
pin/set.go
+1
-1
@@ -188,7 +188,7 @@ func writeHdr(n *merkledag.ProtoNode, hdr *pb.Set) error {
188
return err
189
}
190
191
- // make enough space for the length prefix and the marshalled header data
191
+ // make enough space for the length prefix and the marshaled header data
192
data := make([]byte, binary.MaxVarintLen64, binary.MaxVarintLen64+len(hdrData))
193
194
// write the uvarint length of the header data
plugin/plugin.go
+1
-1
@@ -3,7 +3,7 @@ package plugin
3
// Plugin is base interface for all kinds of go-ipfs plugins
4
// It will be included in interfaces of different Plugins
5
type Plugin interface {
6
- // Name should return uniqe name of the plugin
6
+ // Name should return unique name of the plugin
7
Name() string
8
// Version returns current version of the plugin
9
Version() string
repo/fsrepo/fsrepo.go
+1
-1
@@ -476,7 +476,7 @@ func (r *FSRepo) Config() (*config.Config, error) {
476
477
// It is not necessary to hold the package lock since the repo is in an
478
// opened state. The package lock is _not_ meant to ensure that the repo is
479
- // thread-safe. The package lock is only meant to guard againt removal and
479
+ // thread-safe. The package lock is only meant to guard against removal and
480
// coordinate the lockfile. However, we provide thread-safety to keep
481
// things simple.
482
packageLock.Lock()
repo/fsrepo/migrations/mfsr_test.go
+1
-1
@@ -37,7 +37,7 @@ func TestVersion(t *testing.T) {
37
38
assert.Nil(rp.WriteVersion(fsrepoV), t, "Trouble writing version")
39
40
- assert.Nil(rp.CheckVersion(fsrepoV), t, "Trouble checking the verion")
40
+ assert.Nil(rp.CheckVersion(fsrepoV), t, "Trouble checking the version")
41
42
assert.Err(rp.CheckVersion(1), t, "Should throw an error for the wrong version.")
43
}
repo/fsrepo/migrations/migrations.go
+1
-1
@@ -259,7 +259,7 @@ func osWithVariant() (string, error) {
259
// - on standard ubuntu: stdout
260
// - on alpine: stderr (it probably doesn't know the --version flag)
261
//
262
- // we supress non-zero exit codes (see last point about alpine).
262
+ // we suppress non-zero exit codes (see last point about alpine).
263
out, err := exec.Command("sh", "-c", "ldd --version || true").CombinedOutput()
264
if err != nil {
265
return "", err
test/sharness/README.md
+1
-1
@@ -80,7 +80,7 @@ test_expect_success ".ipfs/ has been created" '
80
81
The `|| ...` is a diagnostic run when the preceding command fails.
82
test_fsh is a shell function that echoes the args, runs the cmd,
83
-and then also fails, making sure the test case fails. (wouldnt want
83
+and then also fails, making sure the test case fails. (wouldn't want
84
the diagnostic accidentally returning true and making it _seem_ like
85
the test case succeeded!).
86
thirdparty/dir/dir.go
+3
-3
@@ -14,12 +14,12 @@ func Writable(path string) error {
14
if err := os.MkdirAll(path, os.ModePerm); err != nil {
15
return err
16
}
17
- // Check the directory is writeable
18
- if f, err := os.Create(filepath.Join(path, "._check_writeable")); err == nil {
17
+ // Check the directory is writable
18
+ if f, err := os.Create(filepath.Join(path, "._check_writable")); err == nil {
19
f.Close()
20
os.Remove(f.Name())
21
} else {
22
- return errors.New("'" + path + "' is not writeable")
22
+ return errors.New("'" + path + "' is not writable")
23
}
24
return nil
25
}
unixfs/mod/dagmodifier.go
+2
-2
@@ -52,7 +52,7 @@ type DagModifier struct {
52
}
53
54
// NewDagModifier returns a new DagModifier, the Cid prefix for newly
55
-// created nodes will be inherted from the passed in node. If the Cid
55
+// created nodes will be inhered from the passed in node. If the Cid
56
// version if not 0 raw leaves will also be enabled. The Prefix and
57
// RawLeaves options can be overridden by changing them after the call.
58
func NewDagModifier(ctx context.Context, from ipld.Node, serv ipld.DAGService, spl chunker.SplitterGen) (*DagModifier, error) {
@@ -82,7 +82,7 @@ func NewDagModifier(ctx context.Context, from ipld.Node, serv ipld.DAGService, s
82
83
// WriteAt will modify a dag file in place
84
func (dm *DagModifier) WriteAt(b []byte, offset int64) (int, error) {
85
- // TODO: this is currently VERY inneficient
85
+ // TODO: this is currently VERY inefficient
86
// each write that happens at an offset other than the current one causes a
87
// flush to disk, and dag rewrite
88
if offset == int64(dm.writeStart) && dm.wrBuf != nil {