fix a bug in Go snippet