File tree Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Expand file tree Collapse file tree 2 files changed +38
-0
lines changed Original file line number Diff line number Diff line change
1
+ // Copyright 2016, Google Inc. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package main
6
+
7
+ import (
8
+ "net/http"
9
+ )
10
+
11
+ // This is a separate file so it can be selectively included/excluded from
12
+ // builds to opt in/out of the redirect.
13
+
14
+ func init () {
15
+ // Anything unrecognized gets redirected to the status page.
16
+ http .HandleFunc ("/" , func (w http.ResponseWriter , r * http.Request ) {
17
+ http .Redirect (w , r , "/debug/status" , http .StatusFound )
18
+ })
19
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright 2016, Google Inc. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style
3
+ // license that can be found in the LICENSE file.
4
+
5
+ package main
6
+
7
+ import (
8
+ "net/http"
9
+ )
10
+
11
+ // This is a separate file so it can be selectively included/excluded from
12
+ // builds to opt in/out of the redirect.
13
+
14
+ func init () {
15
+ // Anything unrecognized gets redirected to the status page.
16
+ http .HandleFunc ("/" , func (w http.ResponseWriter , r * http.Request ) {
17
+ http .Redirect (w , r , "/debug/status" , http .StatusFound )
18
+ })
19
+ }
You can’t perform that action at this time.
0 commit comments