Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove support for Go1.6-1.8 #2428

Merged
merged 3 commits into from
Nov 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -182,7 +182,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 @@ -309,4 +309,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