MCPcopy Create free account
hub / github.com/kevinburke/ssh_config / ExamplePattern

Function ExamplePattern

example_test.go:21–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19}
20
21func ExamplePattern() {
22 pat, _ := ssh_config.NewPattern("*")
23 host := &ssh_config.Host{Patterns: []*ssh_config.Pattern{pat}}
24 fmt.Println(host.Matches("test.stage.example.com"))
25 fmt.Println(host.Matches("othersubdomain.any.any"))
26 // Output:
27 // true
28 // true
29}
30
31func ExampleDecode() {
32 var config = `

Callers

nothing calls this directly

Calls 2

MatchesMethod · 0.95
NewPatternFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…