chore: fix typos and comment formatting (#10653)
* fix typos and comment formatting (cherry picked from commit 7383e1ecbb41d91c3ac14e681d560c3a2702ebd2)
Andrew Gillis committed
Jan 6, 2025 at 16:17 UTC
a0c57cba2205ab04d07802e84781e494120592cc
9 files changed
+22
-22
config/profile.go
+1
-1
@@ -231,7 +231,7 @@ fetching may be degraded.
231
USE WITH CAUTION:
232
The main use case for this is setups with manual Peering.Peers config.
233
Data from this node will not be announced on the DHT. This will make
234
- DHT-based routing an data retrieval impossible if this node is the only
234
+ DHT-based routing and data retrieval impossible if this node is the only
235
one hosting it, and other peers are not already connected to it.
236
`,
237
Transform: func(c *Config) error {
core/commands/cmdenv/cidbase.go
+11
-11
@@ -16,14 +16,14 @@ var (
16
)
17
18
// GetCidEncoder processes the `cid-base` and `output-cidv1` options and
19
-// returns a encoder to use based on those parameters.
19
+// returns an encoder to use based on those parameters.
20
func GetCidEncoder(req *cmds.Request) (cidenc.Encoder, error) {
21
return getCidBase(req, true)
22
}
23
24
-// GetLowLevelCidEncoder is like GetCidEncoder but meant to be used by
25
-// lower level commands. It differs from GetCidEncoder in that CIDv0
26
-// are not, by default, auto-upgraded to CIDv1.
24
+// GetLowLevelCidEncoder is like GetCidEncoder but meant to be used by lower
25
+// level commands. It differs from GetCidEncoder in that CIDv0 are not, by
26
+// default, auto-upgraded to CIDv1.
27
func GetLowLevelCidEncoder(req *cmds.Request) (cidenc.Encoder, error) {
28
return getCidBase(req, false)
29
}
@@ -52,19 +52,19 @@ func getCidBase(req *cmds.Request, autoUpgrade bool) (cidenc.Encoder, error) {
52
return e, nil
53
}
54
55
-// CidBaseDefined returns true if the `cid-base` option is specified
56
-// on the command line
55
+// CidBaseDefined returns true if the `cid-base` option is specified on the
56
+// command line
57
func CidBaseDefined(req *cmds.Request) bool {
58
base, _ := req.Options["cid-base"].(string)
59
return base != ""
60
}
61
62
-// CidEncoderFromPath creates a new encoder that is influenced from
63
-// the encoded Cid in a Path. For CidV0 the multibase from the base
64
-// encoder is used and automatic upgrades are disabled. For CidV1 the
65
-// multibase from the CID is used and upgrades are enabled.
62
+// CidEncoderFromPath creates a new encoder that is influenced from the encoded
63
+// Cid in a Path. For CIDv0 the multibase from the base encoder is used and
64
+// automatic upgrades are disabled. For CIDv1 the multibase from the CID is
65
+// used and upgrades are enabled.
66
//
67
-// This logic is intentionally fuzzy and will match anything of the form
67
+// This logic is intentionally fuzzy and matches anything of the form
68
// `CidLike`, `CidLike/...`, or `/namespace/CidLike/...`.
69
//
70
// For example:
core/node/libp2p/routing.go
+4
-4
@@ -184,9 +184,8 @@ type p2pOnlineRoutingIn struct {
184
Validator record.Validator
185
}
186
187
-// Routing will get all routers obtained from different methods
188
-// (delegated routers, pub-sub, and so on) and add them all together
189
-// using a TieredRouter.
187
+// Routing will get all routers obtained from different methods (delegated
188
+// routers, pub-sub, and so on) and add them all together using a TieredRouter.
189
func Routing(in p2pOnlineRoutingIn) irouting.ProvideManyRouter {
190
routers := in.Routers
191
@@ -206,7 +205,8 @@ func Routing(in p2pOnlineRoutingIn) irouting.ProvideManyRouter {
205
return routinghelpers.NewComposableParallel(cRouters)
206
}
207
209
-// OfflineRouting provides a special Router to the routers list when we are creating a offline node.
208
+// OfflineRouting provides a special Router to the routers list when we are
209
+// creating an offline node.
210
func OfflineRouting(dstore ds.Datastore, validator record.Validator) p2pRouterOut {
211
return p2pRouterOut{
212
Router: Router{
docs/content-blocking.md
+1
-1
@@ -44,7 +44,7 @@ caused the request to be blocked.
44
[NOpfs](https://github.com/ipfs-shipyard/nopfs) supports the format from [IPIP-383](https://github.com/ipfs/specs/pull/383).
45
46
Clear-text rules are simple: just put content paths to block, one per line.
47
-Paths with unicode and whitespace need to be percend-encoded:
47
+Paths with unicode and whitespace need to be percent-encoded:
48
49
```
50
/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
docs/debug-guide.md
+1
-1
@@ -106,6 +106,6 @@ See `tracing/doc.go` for more details.
106
107
### Other
108
109
-If you have any questions, or want us to analyze some weird kubo behaviour,
109
+If you have any questions, or want us to analyze some weird kubo behavior,
110
just let us know, and be sure to include all the profiling information
111
mentioned at the top.
docs/delegated-routing.md
+1
-1
@@ -338,7 +338,7 @@ As test fixtures we can add different use cases here and see how the configurati
338
339
~~We need to create a config migration using [fs-repo-migrations](https://github.com/ipfs/fs-repo-migrations). We should remove the `Routing.Type` param and add the configuration specified [previously](#Mimic-previous-dual-DHT-config).~~
340
341
-We don't need to create any config migration! To avoid to the users the hassle of understanding how the new routing system works, we are gonna keep the old behavior. We will add the Type `custom` to make available the new Routing system.
341
+We don't need to create any config migration! To avoid to the users the hassle of understanding how the new routing system works, we are going to keep the old behavior. We will add the Type `custom` to make available the new Routing system.
342
343
### Security
344
docs/environment-variables.md
+1
-1
@@ -159,7 +159,7 @@ Default: `true`
159
160
## `LIBP2P_TCP_MUX`
161
162
-By default Kubo tries to reuse the same listener port for raw TCP and WebSockers transports via experimental `libp2p.ShareTCPListener()` feature introduced in [go-libp2p#2984](https://github.com/libp2p/go-libp2p/pull/2984).
162
+By default Kubo tries to reuse the same listener port for raw TCP and WebSockets transports via experimental `libp2p.ShareTCPListener()` feature introduced in [go-libp2p#2984](https://github.com/libp2p/go-libp2p/pull/2984).
163
If this is an issue, you can disable it by setting `LIBP2P_TCP_MUX` to `false` and use separate ports for each TCP transport.
164
165
> [!CAUTION]
docs/file-transfer.md
+1
-1
@@ -36,7 +36,7 @@ doesn't even know it has to connect to node A.
36
37
### Checking for existing connections
38
39
-The first thing to do is to double check that both nodes are in fact running
39
+The first thing to do is to double-check that both nodes are in fact running
40
and online. To do this, run `ipfs id` on each machine. If both nodes show some
41
addresses (like the example below), then your nodes are online.
42
test/cli/basic_commands_test.go
+1
-1
@@ -112,7 +112,7 @@ func TestAllRootCommandsAreMentionedInHelpText(t *testing.T) {
112
113
// a few base commands are not expected to be in the help message
114
// but we default to requiring them to be in the help message, so that we
115
- // have to make an conscious decision to exclude them
115
+ // have to make a conscious decision to exclude them
116
notInHelp := map[string]bool{
117
"object": true,
118
"shutdown": true,