Go's
net/http server is
pretty fast, but sometimes you want to get faster. One way to do that is to create
a binary array in memory for static files (assets). Here''s how I generate the
byte arrays automatically with
xxd.
Note that this makes the build go slower as you have more and bigger assets.If
this is a problem, take a look at
nrsc
;)
Since the go toolchain does not support custom steps currently, I''m using make.
Makefile
httpd.go
No comments:
Post a Comment