diff options
Diffstat (limited to 'website/cmd')
-rw-r--r-- | website/cmd/server/main.go | 9 | ||||
-rw-r--r-- | website/cmd/syscalldocs/BUILD (renamed from website/cmd/generate-syscall-docs/BUILD) | 2 | ||||
-rw-r--r-- | website/cmd/syscalldocs/main.go (renamed from website/cmd/generate-syscall-docs/main.go) | 2 |
3 files changed, 8 insertions, 5 deletions
diff --git a/website/cmd/server/main.go b/website/cmd/server/main.go index 18cd525d2..7c8bc9bfa 100644 --- a/website/cmd/server/main.go +++ b/website/cmd/server/main.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Server is the main gvisor.dev binary. package main import ( @@ -65,7 +66,7 @@ var prefixHelpers = map[string]string{ } var ( - validId = regexp.MustCompile(`^[A-Za-z0-9-]*/?$`) + validID = regexp.MustCompile(`^[A-Za-z0-9-]*/?$`) goGetHTML5 = `<!doctype html><html><head><meta charset=utf-8> <meta name="go-import" content="gvisor.dev/gvisor git https://github.com/google/gvisor"> <meta name="go-import" content="gvisor.dev/website git https://github.com/google/gvisor-website"> @@ -123,7 +124,7 @@ func hostRedirectHandler(h http.Handler) http.Handler { return } - if *projectId != "" && r.Host == *projectId+".appspot.com" && *customHost != "" { + if *projectID != "" && r.Host == *projectID+".appspot.com" && *customHost != "" { // Redirect to the custom domain. r.URL.Scheme = "https" // Assume https. r.URL.Host = *customHost @@ -143,7 +144,7 @@ func prefixRedirectHandler(prefix, baseURL string) http.Handler { return } id := r.URL.Path[len(prefix):] - if !validId.MatchString(id) { + if !validID.MatchString(id) { http.Error(w, "Not found", http.StatusNotFound) return } @@ -195,7 +196,7 @@ var ( staticDir = flag.String("static-dir", envFlagString("STATIC_DIR", "_site"), "static files directory") // Uses the standard GOOGLE_CLOUD_PROJECT environment variable set by App Engine. - projectId = flag.String("project-id", envFlagString("GOOGLE_CLOUD_PROJECT", ""), "The App Engine project ID.") + projectID = flag.String("project-id", envFlagString("GOOGLE_CLOUD_PROJECT", ""), "The App Engine project ID.") customHost = flag.String("custom-domain", envFlagString("CUSTOM_DOMAIN", "gvisor.dev"), "The application's custom domain.") ) diff --git a/website/cmd/generate-syscall-docs/BUILD b/website/cmd/syscalldocs/BUILD index 40d13e5c8..c5a0ed7fe 100644 --- a/website/cmd/generate-syscall-docs/BUILD +++ b/website/cmd/syscalldocs/BUILD @@ -3,7 +3,7 @@ load("//tools:defs.bzl", "go_binary") package(licenses = ["notice"]) go_binary( - name = "generate-syscall-docs", + name = "syscalldocs", srcs = ["main.go"], visibility = ["//website:__pkg__"], ) diff --git a/website/cmd/generate-syscall-docs/main.go b/website/cmd/syscalldocs/main.go index 9ca1b9730..62d293a05 100644 --- a/website/cmd/generate-syscall-docs/main.go +++ b/website/cmd/syscalldocs/main.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Binary syscalldocs generates system call markdown. package main import ( @@ -27,6 +28,7 @@ import ( "text/template" ) +// CompatibilityInfo is the collection of all information. type CompatibilityInfo map[string]map[string]ArchInfo // ArchInfo is compatbility doc for an architecture. |