فهرست منبع

http2: gofmt -w -s

Change-Id: I5ab995f50ff43cb88d670f52464d6f0e0f188275
Reviewed-on: https://go-review.googlesource.com/20460
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Mikio Hara 9 سال پیش
والد
کامیت
237fc45c42
3فایلهای تغییر یافته به همراه8 افزوده شده و 8 حذف شده
  1. 2 2
      http2/h2demo/launch.go
  2. 4 4
      http2/h2i/h2i.go
  3. 2 2
      http2/transport.go

+ 2 - 2
http2/h2demo/launch.go

@@ -170,9 +170,9 @@ func main() {
 			},
 		},
 		NetworkInterfaces: []*compute.NetworkInterface{
-			&compute.NetworkInterface{
+			{
 				AccessConfigs: []*compute.AccessConfig{
-					&compute.AccessConfig{
+					{
 						Type:  "ONE_TO_ONE_NAT",
 						Name:  "External NAT",
 						NatIP: natIP,

+ 4 - 4
http2/h2i/h2i.go

@@ -56,8 +56,8 @@ type command struct {
 }
 
 var commands = map[string]command{
-	"ping": command{run: (*h2i).cmdPing},
-	"settings": command{
+	"ping": {run: (*h2i).cmdPing},
+	"settings": {
 		run: (*h2i).cmdSettings,
 		complete: func() []string {
 			return []string{
@@ -71,8 +71,8 @@ var commands = map[string]command{
 			}
 		},
 	},
-	"quit":    command{run: (*h2i).cmdQuit},
-	"headers": command{run: (*h2i).cmdHeaders},
+	"quit":    {run: (*h2i).cmdQuit},
+	"headers": {run: (*h2i).cmdHeaders},
 }
 
 func usage() {

+ 2 - 2
http2/transport.go

@@ -418,8 +418,8 @@ func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) {
 	}
 
 	initialSettings := []Setting{
-		Setting{ID: SettingEnablePush, Val: 0},
-		Setting{ID: SettingInitialWindowSize, Val: transportDefaultStreamFlow},
+		{ID: SettingEnablePush, Val: 0},
+		{ID: SettingInitialWindowSize, Val: transportDefaultStreamFlow},
 	}
 	if max := t.maxHeaderListSize(); max != 0 {
 		initialSettings = append(initialSettings, Setting{ID: SettingMaxHeaderListSize, Val: max})