mirror of https://github.com/k3s-io/k3s
Merge pull request #2187 from eparis/go.net-rename
update code.goole.com/p/go.net to golang.org/x/netpull/6/head
commit
6ae208aea9
|
@ -14,21 +14,6 @@
|
|||
"Comment": "null-12",
|
||||
"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",
|
||||
"Comment": "weekly-50",
|
||||
|
@ -150,6 +135,21 @@
|
|||
"ImportPath": "github.com/vaughan0/go-ini",
|
||||
"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",
|
||||
"Rev": "1b9791953ba4027efaeb728c7355e542a203be5e"
|
||||
|
|
|
@ -108,7 +108,7 @@ type Context interface {
|
|||
// // Package user defines a User type that's stored in Contexts.
|
||||
// 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.
|
||||
// type User struct {...}
|
||||
|
@ -124,7 +124,7 @@ type Context interface {
|
|||
//
|
||||
// // NewContext returns a new Context that carries value u.
|
||||
// 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.
|
||||
|
@ -142,27 +142,28 @@ var Canceled = errors.New("context canceled")
|
|||
// deadline passes.
|
||||
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
|
||||
|
||||
func (emptyCtx) Deadline() (deadline time.Time, ok bool) {
|
||||
func (*emptyCtx) Deadline() (deadline time.Time, ok bool) {
|
||||
return
|
||||
}
|
||||
|
||||
func (emptyCtx) Done() <-chan struct{} {
|
||||
func (*emptyCtx) Done() <-chan struct{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (emptyCtx) Err() error {
|
||||
func (*emptyCtx) Err() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (emptyCtx) Value(key interface{}) interface{} {
|
||||
func (*emptyCtx) Value(key interface{}) interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (n emptyCtx) String() string {
|
||||
switch n {
|
||||
func (e *emptyCtx) String() string {
|
||||
switch e {
|
||||
case background:
|
||||
return "context.Background"
|
||||
case todo:
|
||||
|
@ -171,9 +172,9 @@ func (n emptyCtx) String() string {
|
|||
return "unknown empty Context"
|
||||
}
|
||||
|
||||
const (
|
||||
background emptyCtx = 1
|
||||
todo emptyCtx = 2
|
||||
var (
|
||||
background = new(emptyCtx)
|
||||
todo = new(emptyCtx)
|
||||
)
|
||||
|
||||
// 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.Value(k1)
|
||||
},
|
||||
limit: 1,
|
||||
limit: 3,
|
||||
gccgoLimit: 3,
|
||||
},
|
||||
{
|
|
@ -8,7 +8,7 @@ import (
|
|||
"fmt"
|
||||
"time"
|
||||
|
||||
"code.google.com/p/go.net/context"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
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.
|
||||
//
|
||||
// The mapping from encoding labels to encodings is defined at
|
||||
|
@ -11,10 +15,10 @@ import (
|
|||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"code.google.com/p/go.net/html"
|
||||
"code.google.com/p/go.text/encoding"
|
||||
"code.google.com/p/go.text/encoding/charmap"
|
||||
"code.google.com/p/go.text/transform"
|
||||
"golang.org/x/net/html"
|
||||
"golang.org/x/text/encoding"
|
||||
"golang.org/x/text/encoding/charmap"
|
||||
"golang.org/x/text/transform"
|
||||
)
|
||||
|
||||
// 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
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io/ioutil"
|
||||
"runtime"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"code.google.com/p/go.text/transform"
|
||||
"golang.org/x/text/transform"
|
||||
)
|
||||
|
||||
func transformString(t transform.Transformer, s string) (string, error) {
|
||||
|
@ -129,6 +134,11 @@ var sniffTestCases = []struct {
|
|||
}
|
||||
|
||||
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 {
|
||||
content, err := ioutil.ReadFile("testdata/" + tc.filename)
|
||||
if err != nil {
|
||||
|
@ -145,6 +155,11 @@ func TestSniff(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 {
|
||||
content, err := ioutil.ReadFile("testdata/" + tc.filename)
|
||||
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
|
||||
|
||||
package main
|
||||
|
@ -48,9 +52,9 @@ func main() {
|
|||
fmt.Println()
|
||||
|
||||
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"} {
|
||||
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()
|
|
@ -3,13 +3,13 @@
|
|||
package charset
|
||||
|
||||
import (
|
||||
"code.google.com/p/go.text/encoding"
|
||||
"code.google.com/p/go.text/encoding/charmap"
|
||||
"code.google.com/p/go.text/encoding/japanese"
|
||||
"code.google.com/p/go.text/encoding/korean"
|
||||
"code.google.com/p/go.text/encoding/simplifiedchinese"
|
||||
"code.google.com/p/go.text/encoding/traditionalchinese"
|
||||
"code.google.com/p/go.text/encoding/unicode"
|
||||
"golang.org/x/text/encoding"
|
||||
"golang.org/x/text/encoding/charmap"
|
||||
"golang.org/x/text/encoding/japanese"
|
||||
"golang.org/x/text/encoding/korean"
|
||||
"golang.org/x/text/encoding/simplifiedchinese"
|
||||
"golang.org/x/text/encoding/traditionalchinese"
|
||||
"golang.org/x/text/encoding/unicode"
|
||||
)
|
||||
|
||||
var encodings = map[string]struct {
|
|
@ -10,7 +10,7 @@ import (
|
|||
"log"
|
||||
"strings"
|
||||
|
||||
"code.google.com/p/go.net/html"
|
||||
"golang.org/x/net/html"
|
||||
)
|
||||
|
||||
func ExampleParse() {
|
|
@ -5,7 +5,7 @@
|
|||
package html
|
||||
|
||||
import (
|
||||
"code.google.com/p/go.net/html/atom"
|
||||
"golang.org/x/net/html/atom"
|
||||
)
|
||||
|
||||
// A NodeType is the type of a Node.
|
|
@ -10,7 +10,7 @@ import (
|
|||
"io"
|
||||
"strings"
|
||||
|
||||
a "code.google.com/p/go.net/html/atom"
|
||||
a "golang.org/x/net/html/atom"
|
||||
)
|
||||
|
||||
// A parser implements the HTML5 parsing algorithm:
|
|
@ -18,7 +18,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"code.google.com/p/go.net/html/atom"
|
||||
"golang.org/x/net/html/atom"
|
||||
)
|
||||
|
||||
// readParseTest reads a single test case from r.
|
|
@ -11,7 +11,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"code.google.com/p/go.net/html/atom"
|
||||
"golang.org/x/net/html/atom"
|
||||
)
|
||||
|
||||
// A TokenType is the type of a Token.
|
|
@ -8,7 +8,7 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
|
||||
"code.google.com/p/go.net/websocket"
|
||||
"golang.org/x/net/websocket"
|
||||
)
|
||||
|
||||
// This example demonstrates a trivial client.
|
|
@ -8,7 +8,7 @@ import (
|
|||
"io"
|
||||
"net/http"
|
||||
|
||||
"code.google.com/p/go.net/websocket"
|
||||
"golang.org/x/net/websocket"
|
||||
)
|
||||
|
||||
// Echo the data received on the WebSocket.
|
|
@ -19,7 +19,7 @@ package api
|
|||
import (
|
||||
stderrs "errors"
|
||||
|
||||
"code.google.com/p/go.net/context"
|
||||
"golang.org/x/net/context"
|
||||
)
|
||||
|
||||
// Context carries values across API boundaries.
|
||||
|
|
|
@ -32,8 +32,8 @@ import (
|
|||
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||
|
||||
"code.google.com/p/go.net/html"
|
||||
"github.com/golang/glog"
|
||||
"golang.org/x/net/html"
|
||||
)
|
||||
|
||||
// tagsToAttrs states which attributes of which tags require URL substitution.
|
||||
|
|
|
@ -26,7 +26,7 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
"code.google.com/p/go.net/html"
|
||||
"golang.org/x/net/html"
|
||||
)
|
||||
|
||||
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