Created
January 29, 2018 06:05
-
-
Save nosequeldeebee/d8a4b5e705d1c5fe14531ad1c89ee12a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func handleGetBlockchain(w http.ResponseWriter, r *http.Request) { | |
bytes, err := json.MarshalIndent(Blockchain, "", " ") | |
if err != nil { | |
http.Error(w, err.Error(), http.StatusInternalServerError) | |
return | |
} | |
io.WriteString(w, string(bytes)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment