mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 16:29:21 +00:00
Merge pull request #2187 from eparis/go.net-rename
update code.goole.com/p/go.net to golang.org/x/net
This commit is contained in:
commit
6ae208aea9
30
Godeps/Godeps.json
generated
30
Godeps/Godeps.json
generated
@ -14,21 +14,6 @@
|
|||||||
"Comment": "null-12",
|
"Comment": "null-12",
|
||||||
"Rev": "7dda39b2e7d5e265014674c5af696ba4186679e9"
|
"Rev": "7dda39b2e7d5e265014674c5af696ba4186679e9"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"ImportPath": "code.google.com/p/go.net/context",
|
|
||||||
"Comment": "null-144",
|
|
||||||
"Rev": "ad01a6fcc8a19d3a4478c836895ffe883bd2ceab"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"ImportPath": "code.google.com/p/go.net/html",
|
|
||||||
"Comment": "null-144",
|
|
||||||
"Rev": "ad01a6fcc8a19d3a4478c836895ffe883bd2ceab"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"ImportPath": "code.google.com/p/go.net/websocket",
|
|
||||||
"Comment": "null-144",
|
|
||||||
"Rev": "ad01a6fcc8a19d3a4478c836895ffe883bd2ceab"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"ImportPath": "code.google.com/p/goauth2/compute/serviceaccount",
|
"ImportPath": "code.google.com/p/goauth2/compute/serviceaccount",
|
||||||
"Comment": "weekly-50",
|
"Comment": "weekly-50",
|
||||||
@ -150,6 +135,21 @@
|
|||||||
"ImportPath": "github.com/vaughan0/go-ini",
|
"ImportPath": "github.com/vaughan0/go-ini",
|
||||||
"Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1"
|
"Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/net/context",
|
||||||
|
"Comment": "null-214",
|
||||||
|
"Rev": "c043f0dc72e4cdd23ae039470ea9d63e6680a1b2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/net/html",
|
||||||
|
"Comment": "null-214",
|
||||||
|
"Rev": "c043f0dc72e4cdd23ae039470ea9d63e6680a1b2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"ImportPath": "golang.org/x/net/websocket",
|
||||||
|
"Comment": "null-214",
|
||||||
|
"Rev": "c043f0dc72e4cdd23ae039470ea9d63e6680a1b2"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "gopkg.in/v1/yaml",
|
"ImportPath": "gopkg.in/v1/yaml",
|
||||||
"Rev": "1b9791953ba4027efaeb728c7355e542a203be5e"
|
"Rev": "1b9791953ba4027efaeb728c7355e542a203be5e"
|
||||||
|
@ -108,7 +108,7 @@ type Context interface {
|
|||||||
// // Package user defines a User type that's stored in Contexts.
|
// // Package user defines a User type that's stored in Contexts.
|
||||||
// package user
|
// package user
|
||||||
//
|
//
|
||||||
// import "code.google.com/p/go.net/context"
|
// import "golang.org/x/net/context"
|
||||||
//
|
//
|
||||||
// // User is the type of value stored in the Contexts.
|
// // User is the type of value stored in the Contexts.
|
||||||
// type User struct {...}
|
// type User struct {...}
|
||||||
@ -124,7 +124,7 @@ type Context interface {
|
|||||||
//
|
//
|
||||||
// // NewContext returns a new Context that carries value u.
|
// // NewContext returns a new Context that carries value u.
|
||||||
// func NewContext(ctx context.Context, u *User) context.Context {
|
// func NewContext(ctx context.Context, u *User) context.Context {
|
||||||
// return context.WithValue(userKey, u)
|
// return context.WithValue(ctx, userKey, u)
|
||||||
// }
|
// }
|
||||||
//
|
//
|
||||||
// // FromContext returns the User value stored in ctx, if any.
|
// // FromContext returns the User value stored in ctx, if any.
|
||||||
@ -142,27 +142,28 @@ var Canceled = errors.New("context canceled")
|
|||||||
// deadline passes.
|
// deadline passes.
|
||||||
var DeadlineExceeded = errors.New("context deadline exceeded")
|
var DeadlineExceeded = errors.New("context deadline exceeded")
|
||||||
|
|
||||||
// An emptyCtx is never canceled, has no values, and has no deadline.
|
// An emptyCtx is never canceled, has no values, and has no deadline. It is not
|
||||||
|
// struct{}, since vars of this type must have distinct addresses.
|
||||||
type emptyCtx int
|
type emptyCtx int
|
||||||
|
|
||||||
func (emptyCtx) Deadline() (deadline time.Time, ok bool) {
|
func (*emptyCtx) Deadline() (deadline time.Time, ok bool) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (emptyCtx) Done() <-chan struct{} {
|
func (*emptyCtx) Done() <-chan struct{} {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (emptyCtx) Err() error {
|
func (*emptyCtx) Err() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (emptyCtx) Value(key interface{}) interface{} {
|
func (*emptyCtx) Value(key interface{}) interface{} {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n emptyCtx) String() string {
|
func (e *emptyCtx) String() string {
|
||||||
switch n {
|
switch e {
|
||||||
case background:
|
case background:
|
||||||
return "context.Background"
|
return "context.Background"
|
||||||
case todo:
|
case todo:
|
||||||
@ -171,9 +172,9 @@ func (n emptyCtx) String() string {
|
|||||||
return "unknown empty Context"
|
return "unknown empty Context"
|
||||||
}
|
}
|
||||||
|
|
||||||
const (
|
var (
|
||||||
background emptyCtx = 1
|
background = new(emptyCtx)
|
||||||
todo emptyCtx = 2
|
todo = new(emptyCtx)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Background returns a non-nil, empty Context. It is never canceled, has no
|
// Background returns a non-nil, empty Context. It is never canceled, has no
|
@ -365,7 +365,7 @@ func TestAllocs(t *testing.T) {
|
|||||||
c := WithValue(bg, k1, nil)
|
c := WithValue(bg, k1, nil)
|
||||||
c.Value(k1)
|
c.Value(k1)
|
||||||
},
|
},
|
||||||
limit: 1,
|
limit: 3,
|
||||||
gccgoLimit: 3,
|
gccgoLimit: 3,
|
||||||
},
|
},
|
||||||
{
|
{
|
@ -8,7 +8,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"code.google.com/p/go.net/context"
|
"golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ExampleWithTimeout() {
|
func ExampleWithTimeout() {
|
@ -1,3 +1,7 @@
|
|||||||
|
// Copyright 2013 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// Package charset provides common text encodings for HTML documents.
|
// Package charset provides common text encodings for HTML documents.
|
||||||
//
|
//
|
||||||
// The mapping from encoding labels to encodings is defined at
|
// The mapping from encoding labels to encodings is defined at
|
||||||
@ -11,10 +15,10 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"unicode/utf8"
|
"unicode/utf8"
|
||||||
|
|
||||||
"code.google.com/p/go.net/html"
|
"golang.org/x/net/html"
|
||||||
"code.google.com/p/go.text/encoding"
|
"golang.org/x/text/encoding"
|
||||||
"code.google.com/p/go.text/encoding/charmap"
|
"golang.org/x/text/encoding/charmap"
|
||||||
"code.google.com/p/go.text/transform"
|
"golang.org/x/text/transform"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Lookup returns the encoding with the specified label, and its canonical
|
// Lookup returns the encoding with the specified label, and its canonical
|
@ -1,12 +1,17 @@
|
|||||||
|
// Copyright 2013 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
package charset
|
package charset
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"code.google.com/p/go.text/transform"
|
"golang.org/x/text/transform"
|
||||||
)
|
)
|
||||||
|
|
||||||
func transformString(t transform.Transformer, s string) (string, error) {
|
func transformString(t transform.Transformer, s string) (string, error) {
|
||||||
@ -129,6 +134,11 @@ var sniffTestCases = []struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestSniff(t *testing.T) {
|
func TestSniff(t *testing.T) {
|
||||||
|
switch runtime.GOOS {
|
||||||
|
case "nacl": // platforms that don't permit direct file system access
|
||||||
|
t.Skipf("not supported on %q", runtime.GOOS)
|
||||||
|
}
|
||||||
|
|
||||||
for _, tc := range sniffTestCases {
|
for _, tc := range sniffTestCases {
|
||||||
content, err := ioutil.ReadFile("testdata/" + tc.filename)
|
content, err := ioutil.ReadFile("testdata/" + tc.filename)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -145,6 +155,11 @@ func TestSniff(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestReader(t *testing.T) {
|
func TestReader(t *testing.T) {
|
||||||
|
switch runtime.GOOS {
|
||||||
|
case "nacl": // platforms that don't permit direct file system access
|
||||||
|
t.Skipf("not supported on %q", runtime.GOOS)
|
||||||
|
}
|
||||||
|
|
||||||
for _, tc := range sniffTestCases {
|
for _, tc := range sniffTestCases {
|
||||||
content, err := ioutil.ReadFile("testdata/" + tc.filename)
|
content, err := ioutil.ReadFile("testdata/" + tc.filename)
|
||||||
if err != nil {
|
if err != nil {
|
@ -1,3 +1,7 @@
|
|||||||
|
// Copyright 2013 The Go Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
// +build ignore
|
// +build ignore
|
||||||
|
|
||||||
package main
|
package main
|
||||||
@ -48,9 +52,9 @@ func main() {
|
|||||||
fmt.Println()
|
fmt.Println()
|
||||||
|
|
||||||
fmt.Println("import (")
|
fmt.Println("import (")
|
||||||
fmt.Println(`"code.google.com/p/go.text/encoding"`)
|
fmt.Println(`"golang.org/x/text/encoding"`)
|
||||||
for _, pkg := range []string{"charmap", "japanese", "korean", "simplifiedchinese", "traditionalchinese", "unicode"} {
|
for _, pkg := range []string{"charmap", "japanese", "korean", "simplifiedchinese", "traditionalchinese", "unicode"} {
|
||||||
fmt.Printf("\"code.google.com/p/go.text/encoding/%s\"\n", pkg)
|
fmt.Printf("\"golang.org/x/text/encoding/%s\"\n", pkg)
|
||||||
}
|
}
|
||||||
fmt.Println(")")
|
fmt.Println(")")
|
||||||
fmt.Println()
|
fmt.Println()
|
@ -3,13 +3,13 @@
|
|||||||
package charset
|
package charset
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.google.com/p/go.text/encoding"
|
"golang.org/x/text/encoding"
|
||||||
"code.google.com/p/go.text/encoding/charmap"
|
"golang.org/x/text/encoding/charmap"
|
||||||
"code.google.com/p/go.text/encoding/japanese"
|
"golang.org/x/text/encoding/japanese"
|
||||||
"code.google.com/p/go.text/encoding/korean"
|
"golang.org/x/text/encoding/korean"
|
||||||
"code.google.com/p/go.text/encoding/simplifiedchinese"
|
"golang.org/x/text/encoding/simplifiedchinese"
|
||||||
"code.google.com/p/go.text/encoding/traditionalchinese"
|
"golang.org/x/text/encoding/traditionalchinese"
|
||||||
"code.google.com/p/go.text/encoding/unicode"
|
"golang.org/x/text/encoding/unicode"
|
||||||
)
|
)
|
||||||
|
|
||||||
var encodings = map[string]struct {
|
var encodings = map[string]struct {
|
@ -10,7 +10,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"code.google.com/p/go.net/html"
|
"golang.org/x/net/html"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ExampleParse() {
|
func ExampleParse() {
|
@ -5,7 +5,7 @@
|
|||||||
package html
|
package html
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"code.google.com/p/go.net/html/atom"
|
"golang.org/x/net/html/atom"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A NodeType is the type of a Node.
|
// A NodeType is the type of a Node.
|
@ -10,7 +10,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
a "code.google.com/p/go.net/html/atom"
|
a "golang.org/x/net/html/atom"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A parser implements the HTML5 parsing algorithm:
|
// A parser implements the HTML5 parsing algorithm:
|
@ -18,7 +18,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"code.google.com/p/go.net/html/atom"
|
"golang.org/x/net/html/atom"
|
||||||
)
|
)
|
||||||
|
|
||||||
// readParseTest reads a single test case from r.
|
// readParseTest reads a single test case from r.
|
@ -11,7 +11,7 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"code.google.com/p/go.net/html/atom"
|
"golang.org/x/net/html/atom"
|
||||||
)
|
)
|
||||||
|
|
||||||
// A TokenType is the type of a Token.
|
// A TokenType is the type of a Token.
|
@ -8,7 +8,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"code.google.com/p/go.net/websocket"
|
"golang.org/x/net/websocket"
|
||||||
)
|
)
|
||||||
|
|
||||||
// This example demonstrates a trivial client.
|
// This example demonstrates a trivial client.
|
@ -8,7 +8,7 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"code.google.com/p/go.net/websocket"
|
"golang.org/x/net/websocket"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Echo the data received on the WebSocket.
|
// Echo the data received on the WebSocket.
|
@ -19,7 +19,7 @@ package api
|
|||||||
import (
|
import (
|
||||||
stderrs "errors"
|
stderrs "errors"
|
||||||
|
|
||||||
"code.google.com/p/go.net/context"
|
"golang.org/x/net/context"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Context carries values across API boundaries.
|
// Context carries values across API boundaries.
|
||||||
|
@ -32,8 +32,8 @@ import (
|
|||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
|
||||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||||
|
|
||||||
"code.google.com/p/go.net/html"
|
|
||||||
"github.com/golang/glog"
|
"github.com/golang/glog"
|
||||||
|
"golang.org/x/net/html"
|
||||||
)
|
)
|
||||||
|
|
||||||
// tagsToAttrs states which attributes of which tags require URL substitution.
|
// tagsToAttrs states which attributes of which tags require URL substitution.
|
||||||
|
@ -26,7 +26,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"code.google.com/p/go.net/html"
|
"golang.org/x/net/html"
|
||||||
)
|
)
|
||||||
|
|
||||||
func parseURLOrDie(inURL string) *url.URL {
|
func parseURLOrDie(inURL string) *url.URL {
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user