add method snippet for Go