Skip to content

Instantly share code, notes, and snippets.

@sunho
Created January 13, 2018 22:01
Show Gist options
  • Save sunho/4cdd820dc35019bccf6dd25efc52b886 to your computer and use it in GitHub Desktop.
Save sunho/4cdd820dc35019bccf6dd25efc52b886 to your computer and use it in GitHub Desktop.
switch p := param.(type) {
case string:
ps = append(ps, p)
case *anchor:
i.anchor = p
case int:
ps = append(ps, fmt.Sprint(p))
case bool:
ps = append(ps, fmt.Sprint(p))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment