spbooks / go1 Goto Github PK
View Code? Open in Web Editor NEWCode archive for the book Level Up Your Web Apps With Go
Code archive for the book Level Up Your Web Apps With Go
I receive the following error when trying to run Chapter 7 part 4:
Error rendering template users/show
template: layout.html:31:5: executing "layout.html" at : error calling yield: template: show.html:11:18: executing "users/show" at <.User.Id>: Id is not a field of struct type interface {}
I resolved it by changing 'User.Id' to 'User.ID'.
When you create a Movie without a value for the string property, you say that it will have a zero value of nil. This is not the case - the property is a string and will have a zero value of "" (empty string). A struct with no value itself will be nil, not the property.
I cannot find an errata page for the book (I have a physical copy) - but if you could change it for the digital version...
Hi,
Just a little in convenience:
In user.go
import need to be updated to "golang.org/x/crypto/bcrypt"
Hi,
Just a little inconvenience:
In user.go
import need to be updated to "golang.org/x/crypto/bcrypt"
The import below has to be changed,
you find that in many files, if you gonna maintain the repo I can change and send a PR.
This line is not working.
Hi,
in chapter4/4_httprouter/main.go the line
http.Handle("/assets/", http.StripPrefix("/assets/", http.FileServer(http.Dir("assets/"))))
even if I use the following code:
filesRourter := NewRouter()
filesRourter.ServeFiles("/assets/css/*filepath", http.Dir("assets/"))
doesn't allow the browser to access the css files, the pase has not a style.
I'm using go1.7.1 and the httprouter last commit is 4563b0b.
Could you please fix it?
Thanks
when i do:
$ cd chaptert4/2_first_template
$ go run main.go
I get error:
./main.go:9: undefined: RenderTemplate
what am i doing wrong? (same with go build)
Any path added to secureRouter returns 404 - page not found error.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.