Browse code

Remove Go 1.6 code from moby

Signed-off-by: Boaz Shuster <ripcurld.github@gmail.com>

Boaz Shuster authored on 2017/06/19 02:30:34
Showing 3 changed files
... ...
@@ -1,5 +1,3 @@
1
-// +build go1.7
2
-
3 1
 package httputils
4 2
 
5 3
 import (
6 4
deleted file mode 100644
... ...
@@ -1,16 +0,0 @@
1
-// +build go1.6,!go1.7
2
-
3
-package httputils
4
-
5
-import (
6
-	"encoding/json"
7
-	"net/http"
8
-)
9
-
10
-// WriteJSON writes the value v to the http response stream as json with standard json encoding.
11
-func WriteJSON(w http.ResponseWriter, code int, v interface{}) error {
12
-	w.Header().Set("Content-Type", "application/json")
13
-	w.WriteHeader(code)
14
-	enc := json.NewEncoder(w)
15
-	return enc.Encode(v)
16
-}
17 1
deleted file mode 100644
... ...
@@ -1,31 +0,0 @@
1
-// +build go1.6,!go1.7
2
-
3
-package tlsconfig
4
-
5
-import "crypto/tls"
6
-
7
-// Clone returns a clone of tls.Config. This function is provided for
8
-// compatibility for go1.6 that doesn't include this method in stdlib.
9
-func Clone(c *tls.Config) *tls.Config {
10
-	return &tls.Config{
11
-		Rand:                     c.Rand,
12
-		Time:                     c.Time,
13
-		Certificates:             c.Certificates,
14
-		NameToCertificate:        c.NameToCertificate,
15
-		GetCertificate:           c.GetCertificate,
16
-		RootCAs:                  c.RootCAs,
17
-		NextProtos:               c.NextProtos,
18
-		ServerName:               c.ServerName,
19
-		ClientAuth:               c.ClientAuth,
20
-		ClientCAs:                c.ClientCAs,
21
-		InsecureSkipVerify:       c.InsecureSkipVerify,
22
-		CipherSuites:             c.CipherSuites,
23
-		PreferServerCipherSuites: c.PreferServerCipherSuites,
24
-		SessionTicketsDisabled:   c.SessionTicketsDisabled,
25
-		SessionTicketKey:         c.SessionTicketKey,
26
-		ClientSessionCache:       c.ClientSessionCache,
27
-		MinVersion:               c.MinVersion,
28
-		MaxVersion:               c.MaxVersion,
29
-		CurvePreferences:         c.CurvePreferences,
30
-	}
31
-}