~eliasnaur/giouiorg

2f052d3f6c1964b81b353005ad426d2d5fdbfccd — Elias Naur 2 months ago e3aa257
cmd/giouiorg: serve files from include/files

We're about to add an article that links to a Go program in include/files. Add
the handler for serving files

Signed-off-by: Elias Naur <mail@eliasnaur.com>
1 files changed, 2 insertions(+), 0 deletions(-)

M cmd/giouiorg/main.go
M cmd/giouiorg/main.go => cmd/giouiorg/main.go +2 -0
@@ 18,6 18,8 @@ func main() {
	subHandler("/issue/", http.HandlerFunc(issueHandler))
	subHandler("/commit/", http.HandlerFunc(commitHandler))
	subHandler("/patch/", http.HandlerFunc(patchesHandler))
	subHandler("/include/files/", http.FileServer(http.Dir("include/files")))

	site, err := page.NewSite("Gio - immediate mode GUI in Go")
	if err != nil {
		log.Fatal(err)