Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: tools/bug_chomper/src/server/server.go

Issue 645803003: bug_chomper: Use parenthesized declaration style for const and vars. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/bug_chomper/src/server/server.go
diff --git a/tools/bug_chomper/src/server/server.go b/tools/bug_chomper/src/server/server.go
index 9fb21ed594d4cf7ae6f431a557ef64f09b5098f3..a20c679107e09d842fb2b9aee41681096b715762 100644
--- a/tools/bug_chomper/src/server/server.go
+++ b/tools/bug_chomper/src/server/server.go
@@ -29,30 +29,34 @@ import (
import "github.com/gorilla/securecookie"
-const certFile = "certs/cert.pem"
-const keyFile = "certs/key.pem"
-const issueComment = "Edited by BugChomper"
-const oauthCallbackPath = "/oauth2callback"
-const oauthConfigFile = "oauth_client_secret.json"
-const defaultPort = 8000
-const localHost = "127.0.0.1"
-const maxSessionLen = time.Duration(3600 * time.Second)
-const priorityPrefix = "Priority-"
-const project = "skia"
-const cookieName = "BugChomperCookie"
+const (
+ certFile = "certs/cert.pem"
+ keyFile = "certs/key.pem"
+ issueComment = "Edited by BugChomper"
+ oauthCallbackPath = "/oauth2callback"
+ oauthConfigFile = "oauth_client_secret.json"
+ defaultPort = 8000
+ localHost = "127.0.0.1"
+ maxSessionLen = time.Duration(3600 * time.Second)
+ priorityPrefix = "Priority-"
+ project = "skia"
+ cookieName = "BugChomperCookie"
+)
-var scheme = "http"
+var (
+ scheme = "http"
-var curdir, _ = filepath.Abs(".")
-var templatePath, _ = filepath.Abs("templates")
-var templates = template.Must(template.ParseFiles(
- path.Join(templatePath, "bug_chomper.html"),
- path.Join(templatePath, "submitted.html"),
- path.Join(templatePath, "error.html")))
+ curdir, _ = filepath.Abs(".")
+ templatePath, _ = filepath.Abs("templates")
+ templates = template.Must(template.ParseFiles(
+ path.Join(templatePath, "bug_chomper.html"),
+ path.Join(templatePath, "submitted.html"),
+ path.Join(templatePath, "error.html")))
-var hashKey = securecookie.GenerateRandomKey(32)
-var blockKey = securecookie.GenerateRandomKey(32)
-var secureCookie = securecookie.New(hashKey, blockKey)
+ hashKey = securecookie.GenerateRandomKey(32)
+ blockKey = securecookie.GenerateRandomKey(32)
+ secureCookie = securecookie.New(hashKey, blockKey)
+)
// SessionState contains data for a given session.
type SessionState struct {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698