Browse Source

http2/h2demo: updates to text and Makefile to upload/deploy it

Change-Id: I138f9941726767eb48f8459fb6af417a2c22c569
Reviewed-on: https://go-review.googlesource.com/16955
Reviewed-by: Andrew Gerrand <adg@golang.org>
Brad Fitzpatrick 10 years ago
parent
commit
5627bad10b
3 changed files with 12 additions and 9 deletions
  1. 5 2
      http2/h2demo/Makefile
  2. 4 4
      http2/h2demo/h2demo.go
  3. 3 3
      http2/h2demo/launch.go

+ 5 - 2
http2/h2demo/Makefile

@@ -1,5 +1,8 @@
 h2demo.linux: h2demo.go
 	GOOS=linux go build --tags=h2demo -o h2demo.linux .
 
-upload: h2demo.linux
-	cat h2demo.linux | go run launch.go --write_object=http2-demo-server-tls/h2demo --write_object_is_public
+FORCE:
+
+upload: FORCE
+	go install golang.org/x/build/cmd/upload
+	upload --verbose --osarch=linux-amd64 --tags=h2demo --file=go:golang.org/x/net/http2/h2demo --public http2-demo-server-tls/h2demo

+ 4 - 4
http2/h2demo/h2demo.go

@@ -73,10 +73,10 @@ href="https://http2.github.io/">HTTP/2</a> demo & interop server.</p>
 
 <p>This server exists for others in the HTTP/2 community to test their HTTP/2 client implementations and point out flaws in our server.</p>
 
-<p> The code is currently at <a
-href="https://golang.org/x/net/http2">golang.org/x/net/http2</a>
-but will move to the Go standard library at some point in the future
-(enabled by default, without users needing to change their code).</p>
+<p>
+The code is at <a href="https://golang.org/x/net/http2">golang.org/x/net/http2</a> and
+is used transparently by the Go standard library from Go 1.6 and later.
+</p>
 
 <p>Contact info: <i>bradfitz@golang.org</i>, or <a
 href="https://golang.org/issues">file a bug</a>.</p>

+ 3 - 3
http2/h2demo/launch.go

@@ -52,7 +52,7 @@ var config = &oauth2.Config{
 	ClientSecret: readFile("client-secret.dat"),
 	Endpoint:     google.Endpoint,
 	Scopes: []string{
-		compute.DevstorageFull_controlScope,
+		compute.DevstorageFullControlScope,
 		compute.ComputeScope,
 		"https://www.googleapis.com/auth/sqlservice",
 		"https://www.googleapis.com/auth/sqlservice.admin",
@@ -165,7 +165,7 @@ func main() {
 			Items: []*compute.MetadataItems{
 				{
 					Key:   "user-data",
-					Value: cloudConfig,
+					Value: &cloudConfig,
 				},
 			},
 		},
@@ -185,7 +185,7 @@ func main() {
 			{
 				Email: "default",
 				Scopes: []string{
-					compute.DevstorageFull_controlScope,
+					compute.DevstorageFullControlScope,
 					compute.ComputeScope,
 				},
 			},