mirror of
https://github.com/juanfont/headscale.git
synced 2026-09-13 20:12:03 +09:00
14 lines
477 B
Go
14 lines
477 B
Go
package matcher
|
|
|
|
// MatchFromStrings builds a [Match] from raw source and destination
|
|
// strings. Unparseable entries are silently dropped (fail-open): the
|
|
// resulting [Match] is narrower than the input described, but never
|
|
// wider. Callers that need strict validation should pre-validate
|
|
// their inputs via [util.ParseIPSet].
|
|
func MatchFromStrings(sources, destinations []string) Match {
|
|
return Match{
|
|
srcs: buildIPSet(sources),
|
|
dests: buildIPSet(destinations),
|
|
}
|
|
}
|