14 lines
292 B
Go
14 lines
292 B
Go
package ssh_config
|
|
|
|
import "fmt"
|
|
|
|
func ExampleHost_Matches() {
|
|
pat, _ := NewPattern("test.*.example.com")
|
|
host := &Host{Patterns: []*Pattern{pat}}
|
|
fmt.Println(host.Matches("test.stage.example.com"))
|
|
fmt.Println(host.Matches("othersubdomain.example.com"))
|
|
// Output:
|
|
// true
|
|
// false
|
|
}
|