-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Go Compilation Error" following "Quick Start" guide #8
Comments
I got this problem too |
The code is checking to see if our HTTP request is being proxied by a loadbalancer, which is why it is looking at the "X-Forwarded-For" for the IP. If our requests are being proxied, all the request IPs will show up as the loadbalancer. Here is my fix:
Basically, we pull the header and compare its length. |
Hi there, |
Thanks for this project, its exactely what I am lloking to quick start my project.
I have been following the "Quick Start" procedure from the github.
Installed revel OK
Installed "go get github.com/richtr/baseapp/..." , I have a first error here :
go get github.com/richtr/baseapp/... package github.com/richtr/baseapp/app/controllers imports github.com/richtr/baseapp/app/routes: cannot find package "github.com/richtr/baseapp/app/routes" in any of: /usr/lib/go-1.7/src/github.com/richtr/baseapp/app/routes (from $GOROOT) /home/yann/Documents/projects/src/github.com/richtr/baseapp/app/routes (from $GOPATH)
EDIT: Looking there I don t see /routes :
https://github.com/richtr/baseapp/tree/master/app
GIVES with revel run github.com/richtr/baseapp test
`ERROR 11:54:14 revel build.go:146: # github.com/richtr/baseapp/vendor/github.com/revel/modules/jobs/app/controllers
Documents/projects/src/github.com/richtr/baseapp/vendor/github.com/revel/modules/jobs/app/controllers/status.go:18: invalid operation: c.Controller.Request.Header["X-Forwarded-For"] (type *revel.RevelHeader does not support indexing)
github.com/richtr/baseapp/vendor/github.com/lib/pq
Documents/projects/src/github.com/richtr/baseapp/vendor/github.com/lib/pq/conn_go18.go:14: undefined: driver.NamedValue
Documents/projects/src/github.com/richtr/baseapp/vendor/github.com/lib/pq/conn_go18.go:29: undefined: driver.NamedValue
Documents/projects/src/github.com/richtr/baseapp/vendor/github.com/lib/pq/conn_go18.go:43: undefined: driver.TxOptions
github.com/richtr/baseapp/vendor/github.com/mattn/go-sqlite3
Documents/projects/src/github.com/richtr/baseapp/vendor/github.com/mattn/go-sqlite3/sqlite3_go18.go:26: undefined: driver.NamedValue
Documents/projects/src/github.com/richtr/baseapp/vendor/github.com/mattn/go-sqlite3/sqlite3_go18.go:35: undefined: driver.NamedValue
Documents/projects/src/github.com/richtr/baseapp/vendor/github.com/mattn/go-sqlite3/sqlite3_go18.go:49: undefined: driver.TxOptions
Documents/projects/src/github.com/richtr/baseapp/vendor/github.com/mattn/go-sqlite3/sqlite3_go18.go:54: undefined: driver.NamedValue
Documents/projects/src/github.com/richt`
I installed manually "routes" like this and the ERROR 11:54:14 revel build.go:146 disapeared:
go get github.com/richtr/baseapp/app/routes
Now when I run "revel run github.com/richtr/baseapp test" I get only warnings:
WARN 12:13:30 revel reflect.go:725: Type found in package: controllers, but did not embed from: revel.Controller name=TestSuiteDesc path=github.com/revel/modules/testrunner/app/controllers
WARN 12:13:30 revel reflect.go:725: Type found in package: controllers, but did not embed from: revel.Controller name=TestDesc path=github.com/revel/modules/testrunner/app/controllers
WARN 12:13:30 revel reflect.go:725: Type found in package: controllers, but did not embed from: revel.Controller name=TestSuiteResult path=github.com/revel/modules/testrunner/app/controllers
WARN 12:13:30 revel reflect.go:725: Type found in package: controllers, but did not embed from: revel.Controller name=TestResult path=github.com/revel/modules/testrunner/app/controllers
INFO 12:13:30 revel build.go:235: Cleaning dir tmp
INFO 12:13:30 revel build.go:235: Cleaning dir routes
INFO 12:13:30 revel build.go:87: Vendor folder detected, scanning for deps in path
WARN 12:13:30 revel build.go:93: Build:
dep
executable not found in PATH, but vendor folder detected.Packages can only be added automatically to the vendor folder using thedep
tool. You can install thedep
tool by doing ago get -u github.com/golang/dep/cmd/dep
I get on Localhost 9000 :
The text was updated successfully, but these errors were encountered: