cmd/golangorg: find contentDir even on App Engine

After the refactoring we use this now instead of repoRoot
in the call to NewHandler.

Once we have Go 1.16 this will all be simplified using //go:embed.

Also delete comment that I deleted locally in the previous CL
but then didn't upload before clicking Submit on the Gerrit web page.

Change-Id: Id6e122d39914c1059e97af6cd7e90049142dbe7f
Reviewed-on: https://go-review.googlesource.com/c/website/+/329010
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
diff --git a/cmd/golangorg/server.go b/cmd/golangorg/server.go
index 6c95a91..182bd4a 100644
--- a/cmd/golangorg/server.go
+++ b/cmd/golangorg/server.go
@@ -57,9 +57,12 @@
 }
 
 func main() {
-	repoRoot := "../.."
-	if _, err := os.Stat("_content"); err == nil {
-		repoRoot = "."
+	if *contentDir == "" {
+		repoRoot := "../.."
+		if _, err := os.Stat("_content"); err == nil {
+			repoRoot = "."
+		}
+		*contentDir = filepath.Join(repoRoot, "_content")
 	}
 
 	if runningOnAppEngine {
@@ -71,10 +74,6 @@
 			port = p
 		}
 		*httpAddr = ":" + port
-	} else {
-		if *contentDir == "" {
-			*contentDir = filepath.Join(repoRoot, "_content")
-		}
 	}
 
 	flag.Usage = usage
@@ -184,10 +183,6 @@
 
 	dl.RegisterHandlers(mux, site, datastoreClient, memcacheClient)
 	short.RegisterHandlers(mux, datastoreClient, memcacheClient)
-
-	// Register /compile and /share handlers against the default serve mux
-	// so that other app modules can make plain HTTP requests to those
-	// hosts. (For reasons, HTTPS communication between modules is broken.)
 	proxy.RegisterHandlers(mux)
 
 	log.Println("AppEngine initialization complete")