-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Add UX documentation, link into the apiserver, add a missing file. #1598
Conversation
mux.HandleFunc(prefix, handleStaticFiles) | ||
} | ||
|
||
func handleStaticFiles(res http.ResponseWriter, req *http.Request) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this do something not done by http://golang.org/pkg/net/http/#FileServer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, the files are compiled into the server in go code, so it is still a single monolithic binary, instead of a bunch of files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw, I could use an additional third party package that introduces an addition virtual file driver (https://github.com/elazarl/go-bindata-assetfs)
Let me know if you prefer that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But why not still use a FileServer with a custom implementation of http://golang.org/pkg/net/http/#FileSystem?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking a bit more... what is the reason for using this go-bindata thing? It makes building more painful? (and yes the assetfs thing is much preferable to this method)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, switched to assetfs.
gobindata is useful because it means we don't have to worry about shipping the javascript/css/html separate from the server binary.
Do we have a team member good with html/css/js to review these things? |
Comments addressed. @vmarmol has some js/CSS experience. |
e9bf262
to
280a958
Compare
Looks good as is, but I'm guessing 95% of the interesting stuff is in the data file I can't see :) |
Datafile is actually generated from the assets in the www directory, so you can introspect those. Comments addressed, ptal. Thanks! |
} | ||
|
||
func InstallSupport(mux MuxInterface) { | ||
fileServer := http.FileServer(&assetfs.AssetFS{Asset: Asset, AssetDir: AssetDir, Prefix: "www"}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Much cleaner, thanks for changing
LGTM |
1 similar comment
LGTM |
Add UX documentation, link into the apiserver, add a missing file.
Did this just add a new Godeps without updating Godeps/Godeps.json ?? |
Oops, that's my bad. I will clean that up. Sorry!
|
Well, I'll stop looking at it :) |
Argh, sorry, I was going to ask for that new dep in a separate commit but I got distracted. |
No description provided.