From ba4d16a69da700494bc3e2adaf4332e302fdc0e3 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sat, 17 Jul 2010 17:37:50 -0700 Subject: [PATCH] use gofr; updates for latest Go release --- blobserver/go/Makefile | 4 ++++ blobserver/go/camlistored.go | 7 +++++-- blobserver/go/run.sh | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/blobserver/go/Makefile b/blobserver/go/Makefile index c34420203..ee1dfd94a 100644 --- a/blobserver/go/Makefile +++ b/blobserver/go/Makefile @@ -1,3 +1,7 @@ +main: + echo "I've using gofr to build this now: http://bitbucket.org/kylelemons/gofr/wiki/Home" + exit 999 + include $(GOROOT)/src/Make.$(GOARCH) TARG=camlistored diff --git a/blobserver/go/camlistored.go b/blobserver/go/camlistored.go index ee760e85c..a9cd45757 100644 --- a/blobserver/go/camlistored.go +++ b/blobserver/go/camlistored.go @@ -18,7 +18,10 @@ import ( "regexp" ) -import "./util/_obj/util" +// For `make`: +//import "./util/_obj/util" +// For `gofr`: +import "util/util" // import "mime/multipart" // import multipart "github.com/bradfitz/golang-mime-multipart" @@ -264,7 +267,7 @@ func handlePreUpload(conn *http.Conn, req *http.Request) { ret := make(map[string]interface{}) ret["maxUploadSize"] = 2147483647 // 2GB.. *shrug* - ret["alreadyHave"] = haveVector.Data() + ret["alreadyHave"] = haveVector.Copy() ret["uploadUrl"] = "http://localhost:3179/camli/upload" ret["uploadUrlExpirationSeconds"] = 86400 returnJson(conn, ret) diff --git a/blobserver/go/run.sh b/blobserver/go/run.sh index 9c132ac7c..e66d0fe20 100755 --- a/blobserver/go/run.sh +++ b/blobserver/go/run.sh @@ -2,6 +2,6 @@ mkdir /tmp/camliroot export CAMLI_PASSWORD=foo -make && ./camlistored +gofr && ./camlistored