Skip to content

Instantly share code, notes, and snippets.

Created December 12, 2018 01:45
What would you like to do?
go func() {
todo := document.Call("getElementById", "todo")
var value = todo.Get("value").String()
input, err := json.Marshal(Input{Todo: value})
res, err := http.Post(domain, "application/json", bytes.NewBuffer(input))
if err != nil {
} else {
addTodo(document, value)
defer res.Body.Close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment