What changed, and why it matters
This commit simply renames a small helper function from interfaceAddrs to InterfaceAddrs, making it usable by other packages. It does not change any behavior, fix a bug, or alter security logic.
No security action needed. Treat as a routine API visibility refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch exports the btcutil.interfaceAddrs helper as InterfaceAddrs so it can be called from outside the btcutil package. The implementation still delegates directly to net.InterfaceAddrs(). The only caller inside btcutil (NewTLSCertPair) is updated to use the new exported name. There is no functional change.
Changed components
btcutil/net.gobtcutil/certgen.goInspect captured patch +3 / −3
diff --git a/btcutil/certgen.go b/btcutil/certgen.go
index 52e2d9c..886279e 100644
--- a/btcutil/certgen.go
+++ b/btcutil/certgen.go
@@ -76,7 +76,7 @@ func NewTLSCertPair(organization string, validUntil time.Time, extraHosts []stri
dnsNames = append(dnsNames, host)
}
- addrs, err := interfaceAddrs()
+ addrs, err := InterfaceAddrs()
if err != nil {
return nil, nil, err
}
diff --git a/btcutil/net.go b/btcutil/net.go
index 491e47b..f82f3c9 100644
--- a/btcutil/net.go
+++ b/btcutil/net.go
@@ -11,9 +11,9 @@ import (
"net"
)
-// interfaceAddrs returns a list of the system's network interface addresses.
+// InterfaceAddrs returns a list of the system's network interface addresses.
// It is wrapped here so that we can substitute it for other functions when
// building for systems that do not allow access to net.InterfaceAddrs().
-func interfaceAddrs() ([]net.Addr, error) {
+func InterfaceAddrs() ([]net.Addr, error) {
return net.InterfaceAddrs()
}
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.