mirror of
https://github.com/juanfont/headscale.git
synced 2026-11-05 04:59:26 +09:00
11 lines
458 B
Go
11 lines
458 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 newMatch(buildIPSet(sources), buildIPSet(destinations))
|
|
}
|