Skip to content

Commit

Permalink
Remove support for Go1.6-1.8 (#2428)
Browse files Browse the repository at this point in the history
  • Loading branch information
dfawley authored Nov 1, 2018
1 parent 36ef35d commit 59a2cfb
Show file tree
Hide file tree
Showing 52 changed files with 256 additions and 1,127 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $ go get -u google.golang.org/grpc
Prerequisites
-------------

This requires Go 1.6 or later. Go 1.7 will be required soon.
gRPC-Go requires Go 1.9 or later.

Constraints
-----------
Expand Down
112 changes: 0 additions & 112 deletions benchmark/benchmark16_test.go

This file was deleted.

2 changes: 0 additions & 2 deletions benchmark/benchmark17_test.go → benchmark/benchmark_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build go1.7

/*
*
* Copyright 2017 gRPC authors.
Expand Down
2 changes: 0 additions & 2 deletions benchmark/primitives/primitives_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build go1.7

/*
*
* Copyright 2017 gRPC authors.
Expand Down
2 changes: 1 addition & 1 deletion channelz/service/func_linux.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !appengine,go1.7
// +build !appengine

/*
*
Expand Down
2 changes: 1 addition & 1 deletion channelz/service/func_nonlinux.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build !linux appengine !go1.7
// +build !linux appengine

/*
*
Expand Down
2 changes: 1 addition & 1 deletion channelz/service/service_sktopt_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build linux,!appengine,go1.7
// +build linux,!appengine
// +build 386 amd64

/*
Expand Down
1 change: 1 addition & 0 deletions channelz/service/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ var protoToSocketOpt protoToSocketOptFunc
// with &utcLoc. However zero value of a time.Time type value loc field is nil.
// This behavior will make reflect.DeepEqual fail upon unset time.Time field,
// and cause false positive fatal error.
// TODO: Go1.7 is no longer supported - does this need a change?
var emptyTime time.Time

type dummyChannel struct {
Expand Down
2 changes: 1 addition & 1 deletion channelz/service/util_sktopt_386_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build 386,linux,!appengine,go1.7
// +build 386,linux,!appengine

/*
*
Expand Down
2 changes: 1 addition & 1 deletion channelz/service/util_sktopt_amd64_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build amd64,linux,!appengine,go1.7
// +build amd64,linux,!appengine

/*
*
Expand Down
4 changes: 2 additions & 2 deletions clientconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package grpc

import (
"context"
"errors"
"fmt"
"math"
Expand All @@ -29,7 +30,6 @@ import (
"sync/atomic"
"time"

"golang.org/x/net/context"
"google.golang.org/grpc/balancer"
_ "google.golang.org/grpc/balancer/roundrobin" // To register roundrobin.
"google.golang.org/grpc/codes"
Expand Down Expand Up @@ -183,7 +183,7 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn *
cc.dopts.copts.Dialer = newProxyDialer(
func(ctx context.Context, addr string) (net.Conn, error) {
network, addr := parseDialTarget(addr)
return dialContext(ctx, network, addr)
return (&net.Dialer{}).DialContext(ctx, network, addr)
},
)
}
Expand Down
20 changes: 20 additions & 0 deletions credentials/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,4 +318,24 @@ var cipherSuiteLookup = map[uint16]string{
tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384: "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
tls.TLS_FALLBACK_SCSV: "TLS_FALLBACK_SCSV",
tls.TLS_RSA_WITH_AES_128_CBC_SHA256: "TLS_RSA_WITH_AES_128_CBC_SHA256",
tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256",
tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256: "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256",
tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305: "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305",
tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305: "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305",
}

// cloneTLSConfig returns a shallow clone of the exported
// fields of cfg, ignoring the unexported sync.Once, which
// contains a mutex and must not be copied.
//
// If cfg is nil, a new zero tls.Config is returned.
//
// TODO: inline this function if possible.
func cloneTLSConfig(cfg *tls.Config) *tls.Config {
if cfg == nil {
return &tls.Config{}
}

return cfg.Clone()
}
57 changes: 0 additions & 57 deletions credentials/go16.go

This file was deleted.

59 changes: 0 additions & 59 deletions credentials/go17.go

This file was deleted.

46 changes: 0 additions & 46 deletions credentials/go18.go

This file was deleted.

2 changes: 1 addition & 1 deletion credentials/go19.go → credentials/syscall.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// +build go1.9,!appengine
// +build !appengine

/*
*
Expand Down
2 changes: 0 additions & 2 deletions encoding/proto/proto_benchmark_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build go1.7

/*
*
* Copyright 2014 gRPC authors.
Expand Down
Loading

0 comments on commit 59a2cfb

Please sign in to comment.