func Match(pattern, name string) (matched bool, err error)
Why does pattern
not have to have a type (like pattern string
)?
func Match(pattern, name string) (matched bool, err error)
Why does pattern
not have to have a type (like pattern string
)?
Per https://tour.golang.org/basics/5:
When two or more consecutive named function parameters share a type, you can omit the type from all but the last.
In this example, we shortened
x int, y int
to
x, y int