Skip to content

Commit

Permalink
Merge pull request #238 from multiformats/marco/fix-comment-2
Browse files Browse the repository at this point in the history
chore: Expand comment ForEach
  • Loading branch information
MarcoPolo committed Mar 28, 2024
2 parents 1a42417 + ff645ac commit c73b273
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions util.go
Expand Up @@ -157,6 +157,7 @@ func SplitFunc(m Multiaddr, cb func(Component) bool) (Multiaddr, Multiaddr) {
// ForEach walks over the multiaddr, component by component.
//
// This function iterates over components *by value* to avoid allocating.
// Return true to continue iteration, false to stop.
func ForEach(m Multiaddr, cb func(c Component) bool) {
// Shortcut if we already have a component
if c, ok := m.(*Component); ok {
Expand Down

0 comments on commit c73b273

Please sign in to comment.