MCPcopy Create free account
hub / github.com/encodeous/nylon / RemoveAlias

Function RemoveAlias

core/sys_darwin.go:34–40  ·  view source on GitHub ↗
(logger *slog.Logger, ifName string, addr netip.Addr)

Source from the content-addressed store, hash-verified

32}
33
34func RemoveAlias(logger *slog.Logger, ifName string, addr netip.Addr) error {
35 if addr.Is4() {
36 return Exec(logger, "/sbin/ifconfig", ifName, "-alias", addr.String())
37 } else {
38 return Exec(logger, "/sbin/ifconfig", ifName, "inet6", addr.String(), "-alias")
39 }
40}
41
42func PrefixToMaskString(p netip.Prefix) string {
43 if !p.IsValid() {

Callers

nothing calls this directly

Calls 2

ExecFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected