cmd/gotext: only match files ending with pattern
cmd/gotext: only match files ending with pattern

Exclude files with other extensions like .json.swp from editors.

Fixes golang/go#48983

Change-Id: Id74ca7ae208688cf900661d641e5403d453da33c
Reviewed-on: https://go-review.googlesource.com/c/text/+/357734
Reviewed-by: Marcel van Lohuizen <a22d082192f3ccf984644a4f482781f4c2d65180@golang.org>
Trust: Marcel van Lohuizen <a22d082192f3ccf984644a4f482781f4c2d65180@golang.org>
Trust: Ian Lance Taylor <87e9c6d529889242b7e184afb632328636553ab4@golang.org>
Run-TryBot: Marcel van Lohuizen <a22d082192f3ccf984644a4f482781f4c2d65180@golang.org>
TryBot-Result: Go Bot <66cb808b70d30c07676d5e946fee83fd561249e5@golang.org>

golang/text