FAQ
Reviewers: golang-dev_googlegroups.com,

Message:
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com),

I'd like you to review this change to
https://code.google.com/p/go.talks


Description:
go.talks/present: fix static file path calculation and skip the "pkg"
directory
also chmod -x two other files.

Please review this at http://codereview.appspot.com/6851071/

Affected files:
M present/appengine.go
M present/dir.go
M present/main.go
M present/static/styles.css
M present/templates/slides.tmpl


Index: present/appengine.go
===================================================================
--- a/present/appengine.go
+++ b/present/appengine.go
@@ -8,6 +8,8 @@

const socketPresent = false // no websockets or compilation on app engine
(yet)

+var basePath = "./present/"
+
func HandleSocket(path string) {
panic("websockets not supported on app engine")
}
Index: present/dir.go
===================================================================
--- a/present/dir.go
+++ b/present/dir.go
@@ -21,8 +21,6 @@
http.HandleFunc("/", dirHandler)
}

-var basePath = "./present/"
-
// dirHandler serves a directory listing for the requested path, rooted at
basePath.
func dirHandler(w http.ResponseWriter, r *http.Request) {
if r.URL.Path == "/favicon.ico" {
@@ -126,6 +124,10 @@
}
d := &dirListData{Path: name}
for _, fi := range fis {
+ // skip the pkg directory
+ if name == "." && fi.Name() == "pkg" {
+ continue
+ }
e := dirEntry{
Name: fi.Name(),
Path: filepath.Join(name, fi.Name()),
Index: present/main.go
===================================================================
--- a/present/main.go
+++ b/present/main.go
@@ -20,6 +20,8 @@

const basePkg = "code.google.com/p/go.talks/present"

+var basePath string
+
func main() {
httpListen := flag.String("http", "127.0.0.1:3999", "host:port to listen
on")
flag.StringVar(&basePath, "base", "", "base path for slide template and
static resources")
Index: present/static/styles.css
===================================================================
old mode 100755
new mode 100644
Index: present/templates/slides.tmpl
===================================================================
old mode 100755
new mode 100644

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedNov 23, '12 at 1:04p
activeNov 30, '12 at 4:34p
posts3
users2
websitegolang.org

2 users in discussion

Minux Ma: 2 posts Adg: 1 post

People

Translate

site design / logo © 2022 Grokbase