Skip to content

Commit

Permalink
fix typos and comment formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
gammazero committed Jan 7, 2025
1 parent b7cc47a commit 043ea12
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion config/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ fetching may be degraded.
USE WITH CAUTION:
The main use case for this is setups with manual Peering.Peers config.
Data from this node will not be announced on the DHT. This will make
DHT-based routing an data retrieval impossible if this node is the only
DHT-based routing and data retrieval impossible if this node is the only
one hosting it, and other peers are not already connected to it.
`,
Transform: func(c *Config) error {
Expand Down
22 changes: 11 additions & 11 deletions core/commands/cmdenv/cidbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ var (
)

// GetCidEncoder processes the `cid-base` and `output-cidv1` options and
// returns a encoder to use based on those parameters.
// returns an encoder to use based on those parameters.
func GetCidEncoder(req *cmds.Request) (cidenc.Encoder, error) {
return getCidBase(req, true)
}

// GetLowLevelCidEncoder is like GetCidEncoder but meant to be used by
// lower level commands. It differs from GetCidEncoder in that CIDv0
// are not, by default, auto-upgraded to CIDv1.
// GetLowLevelCidEncoder is like GetCidEncoder but meant to be used by lower
// level commands. It differs from GetCidEncoder in that CIDv0 are not, by
// default, auto-upgraded to CIDv1.
func GetLowLevelCidEncoder(req *cmds.Request) (cidenc.Encoder, error) {
return getCidBase(req, false)
}
Expand Down Expand Up @@ -52,19 +52,19 @@ func getCidBase(req *cmds.Request, autoUpgrade bool) (cidenc.Encoder, error) {
return e, nil
}

// CidBaseDefined returns true if the `cid-base` option is specified
// on the command line
// CidBaseDefined returns true if the `cid-base` option is specified on the
// command line
func CidBaseDefined(req *cmds.Request) bool {
base, _ := req.Options["cid-base"].(string)
return base != ""
}

// CidEncoderFromPath creates a new encoder that is influenced from
// the encoded Cid in a Path. For CidV0 the multibase from the base
// encoder is used and automatic upgrades are disabled. For CidV1 the
// multibase from the CID is used and upgrades are enabled.
// CidEncoderFromPath creates a new encoder that is influenced from the encoded
// Cid in a Path. For CIDv0 the multibase from the base encoder is used and
// automatic upgrades are disabled. For CIDv1 the multibase from the CID is
// used and upgrades are enabled.
//
// This logic is intentionally fuzzy and will match anything of the form
// This logic is intentionally fuzzy and matches anything of the form
// `CidLike`, `CidLike/...`, or `/namespace/CidLike/...`.
//
// For example:
Expand Down
8 changes: 4 additions & 4 deletions core/node/libp2p/routing.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,8 @@ type p2pOnlineRoutingIn struct {
Validator record.Validator
}

// Routing will get all routers obtained from different methods
// (delegated routers, pub-sub, and so on) and add them all together
// using a TieredRouter.
// Routing will get all routers obtained from different methods (delegated
// routers, pub-sub, and so on) and add them all together using a TieredRouter.
func Routing(in p2pOnlineRoutingIn) irouting.ProvideManyRouter {
routers := in.Routers

Expand All @@ -206,7 +205,8 @@ func Routing(in p2pOnlineRoutingIn) irouting.ProvideManyRouter {
return routinghelpers.NewComposableParallel(cRouters)
}

// OfflineRouting provides a special Router to the routers list when we are creating a offline node.
// OfflineRouting provides a special Router to the routers list when we are
// creating an offline node.
func OfflineRouting(dstore ds.Datastore, validator record.Validator) p2pRouterOut {
return p2pRouterOut{
Router: Router{
Expand Down
2 changes: 1 addition & 1 deletion docs/file-transfer.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ doesn't even know it has to connect to node A.

### Checking for existing connections

The first thing to do is to double check that both nodes are in fact running
The first thing to do is to double-check that both nodes are in fact running
and online. To do this, run `ipfs id` on each machine. If both nodes show some
addresses (like the example below), then your nodes are online.

Expand Down
2 changes: 1 addition & 1 deletion test/cli/basic_commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ func TestAllRootCommandsAreMentionedInHelpText(t *testing.T) {

// a few base commands are not expected to be in the help message
// but we default to requiring them to be in the help message, so that we
// have to make an conscious decision to exclude them
// have to make a conscious decision to exclude them
notInHelp := map[string]bool{
"object": true,
"shutdown": true,
Expand Down

0 comments on commit 043ea12

Please sign in to comment.