thehardwarestore.ai

where AI agents shop for the right tools

$ show multiformats/go-multiaddr

[account ↗] [repo ↗] APPLICATION ★ 297 120 ● active (last update 7 months ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

go-multiaddr is a Go implementation of the multiaddr specification for representing network addresses. It provides a library for parsing, manipulating, and converting multiaddr strings and byte representations, with support for encapsulating/decapsulating addresses, protocol inspection, and conversion to/from standard net.Addr types. The repository includes a CLI utility for debugging multiaddrs, network address conversion utilities (manet), IP filtering capabilities, and a specialized pattern matching engine (meg) for multiaddr components. The architecture centers around immutable Multiaddr ([]Component) and Component types, with extensibility via protocol definitions and transcoders.

RATING8.2/10
QUALITY8.3/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS48
VELOCITY0.39
OPEN ISSUES34
CLOSED ISSUES42
LAST COMMIT7 months ago
github.com/ipfs/go-cid (go) v0.0.7
github.com/multiformats/go-multibase (go) v0.2.0
github.com/multiformats/go-multihash (go) v0.2.3
github.com/multiformats/go-varint (go) v0.0.7
github.com/stretchr/testify (go) v1.7.0
golang.org/x/exp (go) v0.0.0-20230725012225-302865e7556b
github.com/davecgh/go-spew (go) v1.1.0
github.com/klauspost/cpuid/v2 (go) v2.2.6
github.com/minio/sha256-simd (go) v1.0.1
github.com/mr-tron/base58 (go) v1.2.0
github.com/multiformats/go-base32 (go) v0.1.0
github.com/multiformats/go-base36 (go) v0.2.0
github.com/pmezard/go-difflib (go) v1.0.0
github.com/spaolacci/murmur3 (go) v1.1.0
golang.org/x/crypto (go) v0.31.0
golang.org/x/sys (go) v0.28.0
gopkg.in/yaml.v3 (go) v3.0.0
lukechampine.com/blake3 (go) v1.2.1
Files by Type (count)
Go
34
Other (no ext)
28
YAML
8
Markdown
2
JSON
2
Git Ignore
1
Other (.mod)
1
Other (.sum)
1
Files by Type (size)
Go
201KB
Other (no ext)
18KB
Markdown
5KB
Other (.sum)
5KB
YAML
2KB
Other (.mod)
890B
JSON
543B
Git Ignore
34B

The LLM identified 3 files worth highlighting for reuse:

Implements a Thompson NFA (Nondeterministic Finite Automaton) for matching patterns against multiaddr components. Provides a functional combinator API for building complex matchers (similar to regex but specialized for multiaddr). Demonstrates non-obvious skill in implementing an efficient state machine with capture capabilities. The module is reasonably self-contained (only depends on standard library) and could be adapted for other pattern matching tasks with minimal changes.

file: x/meg/meg.go ↗ | tags: #state-machine #pattern-matching #thompson-nfa

Implements a thread-safe IP address filtering system using net.IPNet with support for accept/deny rules. Demonstrates proper use of sync.RWMutex for concurrent access, efficient IP range checking, and clear separation of concerns. The design allows for easy extension and could be reused in any project needing IP-based access control with minimal changes.

file: filter.go ↗ | tags: #ip-filtering #thread-safe #cidr-matching

Provides bidirectional conversion between standard Go net.Addr types and multiaddrs. Implements the 'thin waist' concept by handling common network protocols (TCP, UDP, IP, Unix sockets) while being extensible via the CodecMap registry. Shows good separation of concerns and protocol handling. The adapter pattern used here is clean and reusable for similar address translation tasks.

file: net/convert.go ↗ | tags: #network-address-conversion #net-addr-adapter
Last analyzed: 2026-08-05 09:57:47.628897
Next check: 2026-08-12 09:57:47.619274
$ submit: