MCPcopy Index your code
hub / github.com/tailscale/tailscale / closeAllIfError

Method closeAllIfError

wgengine/userspace.go:1609–1615  ·  view source on GitHub ↗
(errp *error)

Source from the content-addressed store, hash-verified

1607func (p *closeOnErrorPool) add(c io.Closer) { *p = append(*p, func() { c.Close() }) }
1608func (p *closeOnErrorPool) addFunc(fn func()) { *p = append(*p, fn) }
1609func (p closeOnErrorPool) closeAllIfError(errp *error) {
1610 if *errp != nil {
1611 for _, closeFn := range p {
1612 closeFn()
1613 }
1614 }
1615}
1616
1617// ipInPrefixes reports whether ip is in any of pp.
1618func ipInPrefixes(ip netip.Addr, pp []netip.Prefix) bool {

Callers 1

NewUserspaceEngineFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected