Checking balanced TeX symbols, Go version