Files
go-ssh-config/example_test.go
2017-05-24 22:10:17 -07:00

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
}