Răsfoiți Sursa

fasthttp: setup files cleanup (#2912)

* fasthttp: setup files cleanup

* fasthttp: build qtc, so it could be used for building templates
Aliaksandr Valialkin 8 ani în urmă
părinte
comite
087adde621

+ 9 - 5
frameworks/Go/fasthttp/setup-mysql.sh

@@ -4,11 +4,15 @@ sed -i 's|tcp(.*:3306)|tcp('"${DBHOST}"':3306)|g' src/server-mysql/server.go
 
 fw_depends mysql go
 
-GOPATH=`pwd` go get -u github.com/go-sql-driver/mysql
-GOPATH=`pwd` go get -u github.com/valyala/fasthttp/...
-GOPATH=`pwd` go get -u github.com/valyala/quicktemplate/qtc
+GOPATH=`pwd`
+
+rm -rf ./pkg/*
+go get -d -u github.com/go-sql-driver/mysql
+go get -d -u github.com/valyala/fasthttp/...
+go get -u github.com/valyala/quicktemplate/qtc
 
 rm -f ./server-mysql
-GOPATH=`pwd` go generate templates
-GOPATH=`pwd` go build server-mysql
+go generate templates
+go build -gcflags='-l=4' server-mysql
+
 ./server-mysql &

+ 9 - 5
frameworks/Go/fasthttp/setup-postgresql.sh

@@ -4,11 +4,15 @@ sed -i 's|localhost|'"${DBHOST}"'|g' src/server-postgresql/server.go
 
 fw_depends postgresql go
 
-GOPATH=`pwd` go get -u github.com/jackc/pgx
-GOPATH=`pwd` go get -u github.com/valyala/fasthttp/...
-GOPATH=`pwd` go get -u github.com/valyala/quicktemplate/qtc
+GOPATH=`pwd`
+
+rm -rf ./pkg/*
+go get -d -u github.com/jackc/pgx
+go get -d -u github.com/valyala/fasthttp/...
+go get -u github.com/valyala/quicktemplate/qtc
 
 rm -f ./server-postgresql
-GOPATH=`pwd` go generate templates
-GOPATH=`pwd` go build server-postgresql
+go generate templates
+go build -gcflags='-l=4' server-postgresql
+
 ./server-postgresql &