Christopher,
The bug is in your program. To debug your program, carefully read the
documentation for the path/filepath.Match function. Especially, "'*'
matches any sequence of non-Separator characters" and "Match requires
pattern to match all of name, not just a substring."
http://golang.org/pkg/path/filepath/#Match
Here's a corrected version of your program.
package main
import (
"fmt"
"path/filepath"
)
func main() {
name := filepath.Base("C:\\Users\\UserName\\TabPage1.layout")
matched, _ := filepath.Match("*.layout", name)
if matched == true {
fmt.Println("Matched")
}
}
Peter
On Feb 8, 6:28 pm, Christopher Redden <
christopher.red...@gmail.com>
wrote: