Skip to content

Instantly share code, notes, and snippets.

@laser laser/server.go
Last active Aug 29, 2015

What would you like to do?
Basic Server - Golang
package main
import (
func NewTodoManagerProxy(url string) todo_manager.TodoManager {
trans := &barrister.HttpTransport{Url: url}
client := barrister.NewRemoteClient(trans, true)
return todo_manager.NewTodoManagerProxy(client)
func main() {
proxy := NewTodoManagerProxy("http://localhost:3000/v1/todos")
props := todo_manager.TodoProperties{"Call Dad", false}
res, err := proxy.CreateTodo(props)
if err == nil {
} else {
fmt.Println("ERROR! ", err)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.