Просмотр исходного кода

go.net: use golang.org/x/... import paths

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/167030043
Andrew Gerrand 11 лет назад
Родитель
Сommit
fbe893ddcd
46 измененных файлов с 83 добавлено и 83 удалено
  1. 1 1
      context/context.go
  2. 1 1
      context/withtimeout_test.go
  3. 4 4
      html/charset/charset.go
  4. 1 1
      html/charset/charset_test.go
  5. 2 2
      html/charset/gen.go
  6. 7 7
      html/charset/table.go
  7. 1 1
      html/example_test.go
  8. 1 1
      html/node.go
  9. 1 1
      html/parse.go
  10. 1 1
      html/parse_test.go
  11. 1 1
      html/token.go
  12. 1 1
      internal/icmp/ipv6.go
  13. 3 3
      internal/icmp/message.go
  14. 4 4
      internal/icmp/message_test.go
  15. 1 1
      ipv4/control_bsd.go
  16. 1 1
      ipv4/control_pktinfo.go
  17. 1 1
      ipv4/control_unix.go
  18. 2 2
      ipv4/example_test.go
  19. 4 4
      ipv4/multicast_test.go
  20. 2 2
      ipv4/multicastlistener_test.go
  21. 2 2
      ipv4/multicastsockopt_test.go
  22. 1 1
      ipv4/sockopt_asmreq_unix.go
  23. 1 1
      ipv4/sockopt_asmreq_windows.go
  24. 1 1
      ipv4/sockopt_asmreqn_unix.go
  25. 1 1
      ipv4/sockopt_unix.go
  26. 1 1
      ipv4/sockopt_windows.go
  27. 4 4
      ipv4/unicast_test.go
  28. 3 3
      ipv4/unicastsockopt_test.go
  29. 1 1
      ipv6/control_rfc2292_unix.go
  30. 1 1
      ipv6/control_rfc3542_unix.go
  31. 1 1
      ipv6/control_unix.go
  32. 1 1
      ipv6/icmp_test.go
  33. 4 4
      ipv6/multicast_test.go
  34. 2 2
      ipv6/multicastlistener_test.go
  35. 2 2
      ipv6/multicastsockopt_test.go
  36. 3 3
      ipv6/readwrite_test.go
  37. 1 1
      ipv6/sockopt_test.go
  38. 1 1
      ipv6/sys_bsd.go
  39. 1 1
      ipv6/sys_darwin.go
  40. 1 1
      ipv6/sys_linux.go
  41. 1 1
      ipv6/sys_windows.go
  42. 4 4
      ipv6/unicast_test.go
  43. 2 2
      ipv6/unicastsockopt_test.go
  44. 1 1
      publicsuffix/gen.go
  45. 1 1
      websocket/exampledial_test.go
  46. 1 1
      websocket/examplehandler_test.go

+ 1 - 1
context/context.go

@@ -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 {...}

+ 1 - 1
context/withtimeout_test.go

@@ -8,7 +8,7 @@ import (
 	"fmt"
 	"time"
 
-	"code.google.com/p/go.net/context"
+	"golang.org/x/net/context"
 )
 
 func ExampleWithTimeout() {

+ 4 - 4
html/charset/charset.go

@@ -11,10 +11,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 - 1
html/charset/charset_test.go

@@ -6,7 +6,7 @@ import (
 	"strings"
 	"testing"
 
-	"code.google.com/p/go.text/transform"
+	"golang.org/x/text/transform"
 )
 
 func transformString(t transform.Transformer, s string) (string, error) {

+ 2 - 2
html/charset/gen.go

@@ -48,9 +48,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()

+ 7 - 7
html/charset/table.go

@@ -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 {

+ 1 - 1
html/example_test.go

@@ -10,7 +10,7 @@ import (
 	"log"
 	"strings"
 
-	"code.google.com/p/go.net/html"
+	"golang.org/x/net/html"
 )
 
 func ExampleParse() {

+ 1 - 1
html/node.go

@@ -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.

+ 1 - 1
html/parse.go

@@ -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:

+ 1 - 1
html/parse_test.go

@@ -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.

+ 1 - 1
html/token.go

@@ -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.

+ 1 - 1
internal/icmp/ipv6.go

@@ -7,7 +7,7 @@ package icmp
 import (
 	"net"
 
-	"code.google.com/p/go.net/internal/iana"
+	"golang.org/x/net/internal/iana"
 )
 
 const ipv6PseudoHeaderLen = 2*net.IPv6len + 8

+ 3 - 3
internal/icmp/message.go

@@ -10,9 +10,9 @@ import (
 	"errors"
 	"net"
 
-	"code.google.com/p/go.net/internal/iana"
-	"code.google.com/p/go.net/ipv4"
-	"code.google.com/p/go.net/ipv6"
+	"golang.org/x/net/internal/iana"
+	"golang.org/x/net/ipv4"
+	"golang.org/x/net/ipv6"
 )
 
 // A Type represents an ICMP message type.

+ 4 - 4
internal/icmp/message_test.go

@@ -9,10 +9,10 @@ import (
 	"reflect"
 	"testing"
 
-	"code.google.com/p/go.net/internal/iana"
-	"code.google.com/p/go.net/internal/icmp"
-	"code.google.com/p/go.net/ipv4"
-	"code.google.com/p/go.net/ipv6"
+	"golang.org/x/net/internal/iana"
+	"golang.org/x/net/internal/icmp"
+	"golang.org/x/net/ipv4"
+	"golang.org/x/net/ipv6"
 )
 
 var marshalAndParseMessageForIPv4Tests = []icmp.Message{

+ 1 - 1
ipv4/control_bsd.go

@@ -11,7 +11,7 @@ import (
 	"syscall"
 	"unsafe"
 
-	"code.google.com/p/go.net/internal/iana"
+	"golang.org/x/net/internal/iana"
 )
 
 func marshalDst(b []byte, cm *ControlMessage) []byte {

+ 1 - 1
ipv4/control_pktinfo.go

@@ -10,7 +10,7 @@ import (
 	"syscall"
 	"unsafe"
 
-	"code.google.com/p/go.net/internal/iana"
+	"golang.org/x/net/internal/iana"
 )
 
 func marshalPacketInfo(b []byte, cm *ControlMessage) []byte {

+ 1 - 1
ipv4/control_unix.go

@@ -11,7 +11,7 @@ import (
 	"syscall"
 	"unsafe"
 
-	"code.google.com/p/go.net/internal/iana"
+	"golang.org/x/net/internal/iana"
 )
 
 func setControlMessage(fd int, opt *rawOpt, cf ControlFlags, on bool) error {

+ 2 - 2
ipv4/example_test.go

@@ -8,8 +8,8 @@ import (
 	"log"
 	"net"
 
-	"code.google.com/p/go.net/internal/iana"
-	"code.google.com/p/go.net/ipv4"
+	"golang.org/x/net/internal/iana"
+	"golang.org/x/net/ipv4"
 )
 
 func ExampleUnicastTCPListener() {

+ 4 - 4
ipv4/multicast_test.go

@@ -11,10 +11,10 @@ import (
 	"testing"
 	"time"
 
-	"code.google.com/p/go.net/internal/iana"
-	"code.google.com/p/go.net/internal/icmp"
-	"code.google.com/p/go.net/internal/nettest"
-	"code.google.com/p/go.net/ipv4"
+	"golang.org/x/net/internal/iana"
+	"golang.org/x/net/internal/icmp"
+	"golang.org/x/net/internal/nettest"
+	"golang.org/x/net/ipv4"
 )
 
 func TestPacketConnReadWriteMulticastUDP(t *testing.T) {

+ 2 - 2
ipv4/multicastlistener_test.go

@@ -10,8 +10,8 @@ import (
 	"runtime"
 	"testing"
 
-	"code.google.com/p/go.net/internal/nettest"
-	"code.google.com/p/go.net/ipv4"
+	"golang.org/x/net/internal/nettest"
+	"golang.org/x/net/ipv4"
 )
 
 var udpMultipleGroupListenerTests = []net.Addr{

+ 2 - 2
ipv4/multicastsockopt_test.go

@@ -10,8 +10,8 @@ import (
 	"runtime"
 	"testing"
 
-	"code.google.com/p/go.net/internal/nettest"
-	"code.google.com/p/go.net/ipv4"
+	"golang.org/x/net/internal/nettest"
+	"golang.org/x/net/ipv4"
 )
 
 var packetConnMulticastSocketOptionTests = []struct {

+ 1 - 1
ipv4/sockopt_asmreq_unix.go

@@ -11,7 +11,7 @@ import (
 	"os"
 	"unsafe"
 
-	"code.google.com/p/go.net/internal/iana"
+	"golang.org/x/net/internal/iana"
 )
 
 func setsockoptIPMreq(fd, name int, ifi *net.Interface, grp net.IP) error {

+ 1 - 1
ipv4/sockopt_asmreq_windows.go

@@ -10,7 +10,7 @@ import (
 	"syscall"
 	"unsafe"
 
-	"code.google.com/p/go.net/internal/iana"
+	"golang.org/x/net/internal/iana"
 )
 
 func setsockoptIPMreq(fd syscall.Handle, name int, ifi *net.Interface, grp net.IP) error {

+ 1 - 1
ipv4/sockopt_asmreqn_unix.go

@@ -11,7 +11,7 @@ import (
 	"os"
 	"unsafe"
 
-	"code.google.com/p/go.net/internal/iana"
+	"golang.org/x/net/internal/iana"
 )
 
 func getsockoptIPMreqn(fd, name int) (*net.Interface, error) {

+ 1 - 1
ipv4/sockopt_unix.go

@@ -11,7 +11,7 @@ import (
 	"os"
 	"unsafe"
 
-	"code.google.com/p/go.net/internal/iana"
+	"golang.org/x/net/internal/iana"
 )
 
 func getInt(fd int, opt *sockOpt) (int, error) {

+ 1 - 1
ipv4/sockopt_windows.go

@@ -10,7 +10,7 @@ import (
 	"syscall"
 	"unsafe"
 
-	"code.google.com/p/go.net/internal/iana"
+	"golang.org/x/net/internal/iana"
 )
 
 func getInt(fd syscall.Handle, opt *sockOpt) (int, error) {

+ 4 - 4
ipv4/unicast_test.go

@@ -11,10 +11,10 @@ import (
 	"testing"
 	"time"
 
-	"code.google.com/p/go.net/internal/iana"
-	"code.google.com/p/go.net/internal/icmp"
-	"code.google.com/p/go.net/internal/nettest"
-	"code.google.com/p/go.net/ipv4"
+	"golang.org/x/net/internal/iana"
+	"golang.org/x/net/internal/icmp"
+	"golang.org/x/net/internal/nettest"
+	"golang.org/x/net/ipv4"
 )
 
 func benchmarkUDPListener() (net.PacketConn, net.Addr, error) {

+ 3 - 3
ipv4/unicastsockopt_test.go

@@ -10,9 +10,9 @@ import (
 	"runtime"
 	"testing"
 
-	"code.google.com/p/go.net/internal/iana"
-	"code.google.com/p/go.net/internal/nettest"
-	"code.google.com/p/go.net/ipv4"
+	"golang.org/x/net/internal/iana"
+	"golang.org/x/net/internal/nettest"
+	"golang.org/x/net/ipv4"
 )
 
 func TestConnUnicastSocketOptions(t *testing.T) {

+ 1 - 1
ipv6/control_rfc2292_unix.go

@@ -10,7 +10,7 @@ import (
 	"syscall"
 	"unsafe"
 
-	"code.google.com/p/go.net/internal/iana"
+	"golang.org/x/net/internal/iana"
 )
 
 func marshal2292HopLimit(b []byte, cm *ControlMessage) []byte {

+ 1 - 1
ipv6/control_rfc3542_unix.go

@@ -10,7 +10,7 @@ import (
 	"syscall"
 	"unsafe"
 
-	"code.google.com/p/go.net/internal/iana"
+	"golang.org/x/net/internal/iana"
 )
 
 func marshalTrafficClass(b []byte, cm *ControlMessage) []byte {

+ 1 - 1
ipv6/control_unix.go

@@ -10,7 +10,7 @@ import (
 	"os"
 	"syscall"
 
-	"code.google.com/p/go.net/internal/iana"
+	"golang.org/x/net/internal/iana"
 )
 
 func setControlMessage(fd int, opt *rawOpt, cf ControlFlags, on bool) error {

+ 1 - 1
ipv6/icmp_test.go

@@ -12,7 +12,7 @@ import (
 	"sync"
 	"testing"
 
-	"code.google.com/p/go.net/ipv6"
+	"golang.org/x/net/ipv6"
 )
 
 var icmpStringTests = []struct {

+ 4 - 4
ipv6/multicast_test.go

@@ -12,10 +12,10 @@ import (
 	"testing"
 	"time"
 
-	"code.google.com/p/go.net/internal/iana"
-	"code.google.com/p/go.net/internal/icmp"
-	"code.google.com/p/go.net/internal/nettest"
-	"code.google.com/p/go.net/ipv6"
+	"golang.org/x/net/internal/iana"
+	"golang.org/x/net/internal/icmp"
+	"golang.org/x/net/internal/nettest"
+	"golang.org/x/net/ipv6"
 )
 
 func TestPacketConnReadWriteMulticastUDP(t *testing.T) {

+ 2 - 2
ipv6/multicastlistener_test.go

@@ -11,8 +11,8 @@ import (
 	"runtime"
 	"testing"
 
-	"code.google.com/p/go.net/internal/nettest"
-	"code.google.com/p/go.net/ipv6"
+	"golang.org/x/net/internal/nettest"
+	"golang.org/x/net/ipv6"
 )
 
 var udpMultipleGroupListenerTests = []net.Addr{

+ 2 - 2
ipv6/multicastsockopt_test.go

@@ -10,8 +10,8 @@ import (
 	"runtime"
 	"testing"
 
-	"code.google.com/p/go.net/internal/nettest"
-	"code.google.com/p/go.net/ipv6"
+	"golang.org/x/net/internal/nettest"
+	"golang.org/x/net/ipv6"
 )
 
 var packetConnMulticastSocketOptionTests = []struct {

+ 3 - 3
ipv6/readwrite_test.go

@@ -11,9 +11,9 @@ import (
 	"sync"
 	"testing"
 
-	"code.google.com/p/go.net/internal/iana"
-	"code.google.com/p/go.net/internal/nettest"
-	"code.google.com/p/go.net/ipv6"
+	"golang.org/x/net/internal/iana"
+	"golang.org/x/net/internal/nettest"
+	"golang.org/x/net/ipv6"
 )
 
 func benchmarkUDPListener() (net.PacketConn, net.Addr, error) {

+ 1 - 1
ipv6/sockopt_test.go

@@ -10,7 +10,7 @@ import (
 	"runtime"
 	"testing"
 
-	"code.google.com/p/go.net/ipv6"
+	"golang.org/x/net/ipv6"
 )
 
 var supportsIPv6 bool

+ 1 - 1
ipv6/sys_bsd.go

@@ -10,7 +10,7 @@ import (
 	"net"
 	"syscall"
 
-	"code.google.com/p/go.net/internal/iana"
+	"golang.org/x/net/internal/iana"
 )
 
 type sysSockoptLen int32

+ 1 - 1
ipv6/sys_darwin.go

@@ -8,7 +8,7 @@ import (
 	"net"
 	"syscall"
 
-	"code.google.com/p/go.net/internal/iana"
+	"golang.org/x/net/internal/iana"
 )
 
 type sysSockoptLen int32

+ 1 - 1
ipv6/sys_linux.go

@@ -8,7 +8,7 @@ import (
 	"net"
 	"syscall"
 
-	"code.google.com/p/go.net/internal/iana"
+	"golang.org/x/net/internal/iana"
 )
 
 type sysSockoptLen int32

+ 1 - 1
ipv6/sys_windows.go

@@ -8,7 +8,7 @@ import (
 	"net"
 	"syscall"
 
-	"code.google.com/p/go.net/internal/iana"
+	"golang.org/x/net/internal/iana"
 )
 
 const (

+ 4 - 4
ipv6/unicast_test.go

@@ -12,10 +12,10 @@ import (
 	"testing"
 	"time"
 
-	"code.google.com/p/go.net/internal/iana"
-	"code.google.com/p/go.net/internal/icmp"
-	"code.google.com/p/go.net/internal/nettest"
-	"code.google.com/p/go.net/ipv6"
+	"golang.org/x/net/internal/iana"
+	"golang.org/x/net/internal/icmp"
+	"golang.org/x/net/internal/nettest"
+	"golang.org/x/net/ipv6"
 )
 
 func TestPacketConnReadWriteUnicastUDP(t *testing.T) {

+ 2 - 2
ipv6/unicastsockopt_test.go

@@ -10,8 +10,8 @@ import (
 	"runtime"
 	"testing"
 
-	"code.google.com/p/go.net/internal/iana"
-	"code.google.com/p/go.net/ipv6"
+	"golang.org/x/net/internal/iana"
+	"golang.org/x/net/ipv6"
 )
 
 func TestConnUnicastSocketOptions(t *testing.T) {

+ 1 - 1
publicsuffix/gen.go

@@ -31,7 +31,7 @@ import (
 	"sort"
 	"strings"
 
-	"code.google.com/p/go.net/idna"
+	"golang.org/x/net/idna"
 )
 
 const (

+ 1 - 1
websocket/exampledial_test.go

@@ -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.

+ 1 - 1
websocket/examplehandler_test.go

@@ -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.