Skip to content

Instantly share code, notes, and snippets.

@grantseltzer
Last active August 15, 2019 20:07
Show Gist options
  • Save grantseltzer/4cce7fe0d1a75af83bca12bbd5f7e6a2 to your computer and use it in GitHub Desktop.
Save grantseltzer/4cce7fe0d1a75af83bca12bbd5f7e6a2 to your computer and use it in GitHub Desktop.
package switchers
import "testing"
func TestSwitch(t *testing.T) {
var (
a int
b int
c = &b
)
x := SwitchFunction(a, b, c)
if x != "c" {
t.Error("wtf?")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment