Skip to content

Instantly share code, notes, and snippets.

@collinvandyck
Created September 12, 2012 19:23
Show Gist options
  • Select an option

  • Save collinvandyck/3709261 to your computer and use it in GitHub Desktop.

Select an option

Save collinvandyck/3709261 to your computer and use it in GitHub Desktop.
bytes, err := json.Marshal(user)
if err != nil {
http.Error(w, err.Error(), Unauthorized)
return
}
w.Write(bytes)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment