]> Cypherpunks repositories - gostls13.git/commitdiff
renaming_4: gofix -r everything/but/src/pkg
authorRob Pike <r@golang.org>
Tue, 8 Nov 2011 23:43:02 +0000 (15:43 -0800)
committerRob Pike <r@golang.org>
Tue, 8 Nov 2011 23:43:02 +0000 (15:43 -0800)
R=rsc
CC=golang-dev
https://golang.org/cl/5338043

52 files changed:
doc/codelab/wiki/final-noclosure.go
doc/codelab/wiki/final-noerror.go
doc/codelab/wiki/final-parsetemplate.go
doc/codelab/wiki/final-template.go
doc/codelab/wiki/final.go
doc/codelab/wiki/get.go
doc/codelab/wiki/htmlify.go
doc/codelab/wiki/http-sample.go
doc/codelab/wiki/index.html
doc/codelab/wiki/notemplate.go
doc/codelab/wiki/part2.go
doc/codelab/wiki/srcextract.go
doc/codewalk/markov.go
doc/codewalk/pig.go
doc/codewalk/urlpoll.go
doc/progs/eff_qr.go
doc/talks/io2010/balance.go
doc/tmpltohtml.go
misc/dashboard/builder/exec.go
misc/dashboard/builder/http.go
misc/dashboard/builder/main.go
misc/goplay/goplay.go
src/cmd/cgo/util.go
src/cmd/go/main.go
src/cmd/godoc/appinit.go
src/cmd/godoc/codewalk.go
src/cmd/godoc/format.go
src/cmd/godoc/godoc.go
src/cmd/godoc/httpzip.go
src/cmd/godoc/index.go
src/cmd/godoc/main.go
src/cmd/godoc/spec.go
src/cmd/godoc/utils.go
src/cmd/gofix/main.go
src/cmd/gofmt/gofmt.go
src/cmd/gofmt/rewrite.go
src/cmd/goinstall/download.go
src/cmd/goinstall/main.go
src/cmd/goinstall/make.go
src/cmd/gotest/gotest.go
src/cmd/govet/govet.go
src/cmd/hgpatch/main.go
test/alias.go
test/bench/pidigits.go
test/chan/select5.go
test/cmplxdivide.go
test/garbage/parser.go
test/ken/divconst.go
test/ken/modconst.go
test/mallocrand.go
test/stringrange.go
test/utf.go

index 47f84a7d451f2d2e3a5e538cea7114636a14b7ae..2d42106398d4c53029923f0150dcb06b01ccb67b 100644 (file)
@@ -2,10 +2,10 @@ package main
 
 import (
        "errors"
-       "http"
        "io/ioutil"
+       "net/http"
        "regexp"
-       "template"
+       "text/template"
 )
 
 type Page struct {
index 69e191292fb1c4d7b4ba92785f5724714fcf768b..53433e958cb0815cf3ac061b6b15f28a444714f3 100644 (file)
@@ -1,9 +1,9 @@
 package main
 
 import (
-       "http"
        "io/ioutil"
-       "template"
+       "net/http"
+       "text/template"
 )
 
 type Page struct {
index d3675a0e199538b1a7a26c70305e3991236e7a0e..e3d8a97a1d81264d48e1ccba118d933c8cd14f62 100644 (file)
@@ -1,10 +1,10 @@
 package main
 
 import (
-       "http"
        "io/ioutil"
+       "net/http"
        "regexp"
-       "template"
+       "text/template"
 )
 
 type Page struct {
index 4b5c44e09003a576688e683d0170bb795c169929..0230ae578035aeceb834316e59c702034f121d63 100644 (file)
@@ -1,9 +1,9 @@
 package main
 
 import (
-       "http"
        "io/ioutil"
-       "template"
+       "net/http"
+       "text/template"
 )
 
 type Page struct {
index 11620af3ed3555e114a573d63ab945c5353c2241..66f19c1e9f343cdbc68b273ff1d021a95fe43c46 100644 (file)
@@ -1,10 +1,10 @@
 package main
 
 import (
-       "http"
        "io/ioutil"
+       "net/http"
        "regexp"
-       "template"
+       "text/template"
 )
 
 type Page struct {
index 723484dec985df22e0d5c2d353f8690802a00e3a..383935378db3d0d6fa11e371d9cb53bb79d3df0f 100644 (file)
@@ -1,12 +1,12 @@
 package main
 
 import (
-       "http"
        "flag"
        "fmt"
        "io"
        "log"
        "net"
+       "net/http"
        "os"
        "strings"
 )
index 9e7605b92111b50cd4ea0a517b0afa88da4a9dad..1f9023f43714c6a30f7b6b33be57b5174dc3efbf 100644 (file)
@@ -1,9 +1,9 @@
 package main
 
 import (
-       "template"
-       "os"
        "io/ioutil"
+       "os"
+       "text/template"
 )
 
 func main() {
index 33379a1b65068e9589da81054b708946b2703799..ac8cc4f2d6739848fd2babaa50dbfb31c151a863 100644 (file)
@@ -2,7 +2,7 @@ package main
 
 import (
        "fmt"
-       "http"
+       "net/http"
 )
 
 func handler(w http.ResponseWriter, r *http.Request) {
index 3dafc5cbef36f6c0c07345937cf1f4b9121f9dea..08e181e3b0e88ae8141e7c94f3c143bfe06c0fae 100644 (file)
@@ -237,7 +237,7 @@ package main
 
 import (
        &#34;fmt&#34;
-       &#34;http&#34;
+       &#34;net/http&#34;
 )
 
 func handler(w http.ResponseWriter, r *http.Request) {
index d2deec11e5d68c3427bb74e4090d48339d486797..2b2aa685f6daf66b394c946c88a73b5ff59a1514 100644 (file)
@@ -2,8 +2,8 @@ package main
 
 import (
        "fmt"
-       "http"
        "io/ioutil"
+       "net/http"
 )
 
 type Page struct {
index a192089debe6fc877a128b99b016f3071826a5fb..96359a17e2e81ec8b75c191d412f438f768ca717 100644 (file)
@@ -2,8 +2,8 @@ package main
 
 import (
        "fmt"
-       "http"
        "io/ioutil"
+       "net/http"
 )
 
 type Page struct {
index 6b5fbcb4323dbeb44a07ba2147503d837f2a56c1..74c33a2d64381ad8053e9cced62cbc2d5a37f46d 100644 (file)
@@ -3,13 +3,13 @@ package main
 import (
        "bytes"
        "flag"
+       "go/ast"
        "go/parser"
        "go/printer"
-       "go/ast"
        "go/token"
        "log"
-       "template"
        "os"
+       "text/template"
 )
 
 var (
index 959c2b158dfe71ddf378e9a26ebc6360a587247b..cb28eb0bccd5dbce88b31b9eeb4e3fa27187b627 100644 (file)
@@ -50,8 +50,8 @@ import (
        "flag"
        "fmt"
        "io"
+       "math/rand"
        "os"
-       "rand"
        "strings"
        "time"
 )
index 9e415f5899222f6f5a6a1a222646174511d26a86..b3f02aff1e0bfb70ba91237c3384517a75eb9804 100644 (file)
@@ -6,7 +6,7 @@ package main
 
 import (
        "fmt"
-       "rand"
+       "math/rand"
 )
 
 const (
index b320eb1837d8e9432622583eb6d6648fa3f69245..1439e34218a54423f1288f93f290094594431711 100644 (file)
@@ -5,8 +5,8 @@
 package main
 
 import (
-       "http"
        "log"
+       "net/http"
        "time"
 )
 
index 5d1fd38e06ba0f77a27d10bde30ecb95fb066200..de96a0208f43f0e83b2a2a68f463270bb0d875b9 100644 (file)
@@ -2,9 +2,9 @@ package main
 
 import (
        "flag"
-       "http"
        "log"
-       "template"
+       "net/http"
+       "text/template"
 )
 
 var addr = flag.String("addr", ":1718", "http service address") // Q=17, R=18
index b01f7468c5144ca69f04a917c4c581e0c103bcf5..a3825cbc5599dd2359766c4302afe191b72b620b 100644 (file)
@@ -8,7 +8,7 @@ import (
        "container/heap"
        "flag"
        "fmt"
-       "rand"
+       "math/rand"
        "time"
 )
 
index 25bc3a4dbe87c8f91e930b29d2d6cb3d5965c142..d9b002e1e7cbde644d698c40a46409f77ff5395a 100644 (file)
@@ -27,7 +27,7 @@ import (
        "os"
        "regexp"
        "strings"
-       "template"
+       "text/template"
 )
 
 func Usage() {
index b034aa38cfdc0253b8dec10e52b3bc36175f8362..408db34651bae626085e3f9cd9e6cf4ad4a61727 100644 (file)
@@ -6,10 +6,10 @@ package main
 
 import (
        "bytes"
-       "exec"
        "io"
        "log"
        "os"
+       "os/exec"
        "strings"
 )
 
index 3bc2f194d2e734c4582e1aab95f790bf5d1f86ac..3e2217f5412ffd77a303a796e65636978dfa8fe1 100644 (file)
@@ -6,13 +6,13 @@ package main
 
 import (
        "bytes"
+       "encoding/json"
        "errors"
        "fmt"
-       "http"
-       "json"
        "log"
+       "net/http"
+       "net/url"
        "strconv"
-       "url"
 )
 
 type param map[string]string
index abc866a7a49618184622eb837fc52fb2dad23ab0..6168eb348931ca1fd6f345c054155575f4d7d02b 100644 (file)
@@ -5,6 +5,7 @@
 package main
 
 import (
+       "encoding/xml"
        "errors"
        "flag"
        "fmt"
@@ -17,7 +18,6 @@ import (
        "strconv"
        "strings"
        "time"
-       "xml"
 )
 
 const (
index 47dc323f4de2fb88e7c1111180a76ee511904754..aa09e38745165f6f17434091a30038025101a9fe 100644 (file)
@@ -5,16 +5,16 @@
 package main
 
 import (
-       "exec"
        "flag"
-       "http"
        "io"
        "io/ioutil"
        "log"
+       "net/http"
        "os"
+       "os/exec"
        "runtime"
        "strconv"
-       "template"
+       "text/template"
 )
 
 var (
index b4a83bf12ad493ab33742ec0e546e02eda27dc0a..8a778418df619720e3051ecb57939f31359069d7 100644 (file)
@@ -5,11 +5,11 @@
 package main
 
 import (
-       "exec"
        "fmt"
        "go/token"
        "io/ioutil"
        "os"
+       "os/exec"
 )
 
 // run runs the command argv, feeding in stdin on standard input.
index 784399dce81caa2ba4e5a1af96e313a4dac45608..239d77d405901cf01e0bf51e2fb99bf395eac865 100644 (file)
@@ -10,7 +10,7 @@ import (
        "io"
        "os"
        "strings"
-       "template"
+       "text/template"
 )
 
 // A Command is an implementation of a go command
index 37c55451a2279b23d9afb33526ac31fc02214c4a..2b3f41e16018aa7b2e464acacf3df3217baac045 100644 (file)
@@ -9,8 +9,8 @@ package main
 
 import (
        "archive/zip"
-       "http"
        "log"
+       "net/http"
        "path"
 )
 
index 6f25769a3ce8682fcbfb5d17267c3cdee11c8411..0162dc55d73ce35e99cfc8bec00f16d1be703def 100644 (file)
 package main
 
 import (
+       "encoding/xml"
        "errors"
        "fmt"
-       "http"
        "io"
        "log"
+       "net/http"
        "os"
        "regexp"
        "sort"
        "strconv"
        "strings"
-       "template"
-       "utf8"
-       "xml"
+       "text/template"
+       "unicode/utf8"
 )
 
 // Handler for /doc/codewalk/ and below.
index 78dde4166f0cab6db5eddefe201116f6b9b8846b..1855072c013377aba18aa70dfeccbd6566da9e0f 100644 (file)
@@ -17,7 +17,7 @@ import (
        "io"
        "regexp"
        "strconv"
-       "template"
+       "text/template"
 )
 
 // ----------------------------------------------------------------------------
index 0d82a1504c0c0d0240a12711443a0241a143d8ce..6ddae54bb24261cadab5c7e124987403d6eecab8 100644 (file)
@@ -13,9 +13,9 @@ import (
        "go/doc"
        "go/printer"
        "go/token"
-       "http"
        "io"
        "log"
+       "net/http"
        "os"
        "path"
        "path/filepath"
@@ -23,7 +23,7 @@ import (
        "runtime"
        "sort"
        "strings"
-       "template"
+       "text/template"
        "time"
 )
 
index 3e25b6473d94cb16c47cd2f5f89a78583c65ef84..a6c5ed654f54bbe2ac282de49d8c51f00d790631 100644 (file)
@@ -26,8 +26,8 @@ package main
 import (
        "archive/zip"
        "fmt"
-       "http"
        "io"
+       "net/http"
        "os"
        "path"
        "sort"
index 172eae3969984e832d073e6d3387f17bcaeaed0a..27dd4feec1bb21fac37aa5ccafac59b79e41708e 100644 (file)
@@ -40,12 +40,12 @@ package main
 import (
        "bufio"
        "bytes"
+       "encoding/gob"
        "errors"
        "go/ast"
        "go/parser"
        "go/scanner"
        "go/token"
-       "gob"
        "index/suffixarray"
        "io"
        "path/filepath"
index 1a8db4708cbae8a571bbf29005cef8acae8af190..584c805a1befbefac5724c04f033bb60f1d29b00 100644 (file)
@@ -34,10 +34,11 @@ import (
        "fmt"
        "go/ast"
        "go/build"
-       "http"
-       _ "http/pprof" // to serve /debug/pprof/*
        "io"
        "log"
+       "net/http"
+       _ "net/http/pprof" // to serve /debug/pprof/*
+       "net/url"
        "os"
        "path"
        "path/filepath"
@@ -45,7 +46,6 @@ import (
        "runtime"
        "strings"
        "time"
-       "url"
 )
 
 const defaultAddr = ":6060" // default webserver address
index a83348d1bd32ff4fdea3d08c6f96daeb7c8dc65d..c11f25d20b9d89bc13a876e9c3859e6ab5922564 100644 (file)
@@ -14,7 +14,7 @@ import (
        "bytes"
        "fmt"
        "io"
-       "scanner"
+       "text/scanner"
 )
 
 type ebnfParser struct {
index 9ab5f83353ff828c56650abb0deeb5142916ee88..b572647681e345f2a6e9dd21054059932122e6ef 100644 (file)
@@ -15,7 +15,7 @@ import (
        "strings"
        "sync"
        "time"
-       "utf8"
+       "unicode/utf8"
 )
 
 // An RWValue wraps a value and permits mutually exclusive
index fbb705c076312fcc7f7286c8db73a0cfe3f99ad1..a1509b9262dbfa245bf1638ac5b1779654fd177d 100644 (file)
@@ -6,7 +6,6 @@ package main
 
 import (
        "bytes"
-       "exec"
        "flag"
        "fmt"
        "go/ast"
@@ -16,6 +15,7 @@ import (
        "go/token"
        "io/ioutil"
        "os"
+       "os/exec"
        "path/filepath"
        "sort"
        "strings"
index 1ca47eccb8cf1e313e41d1020c44e28bfc20baf3..9562d7965cccf4f6418641e78667712b340c8d64 100644 (file)
@@ -6,7 +6,6 @@ package main
 
 import (
        "bytes"
-       "exec"
        "flag"
        "fmt"
        "go/ast"
@@ -17,6 +16,7 @@ import (
        "io"
        "io/ioutil"
        "os"
+       "os/exec"
        "path/filepath"
        "runtime/pprof"
        "strings"
index 7f2bf0647a4f843a17f76fc561ca8d2bbcc73a6a..25049f8f8c076454ba318f2c5a5db6c3065b502e 100644 (file)
@@ -13,7 +13,7 @@ import (
        "reflect"
        "strings"
        "unicode"
-       "utf8"
+       "unicode/utf8"
 )
 
 func initRewrite() {
index 927970a45b4d2e92068e0bde7b0e0f2468221133..b7225e0b78452fd4e6aebfd4b3d82a7097d68ef1 100644 (file)
@@ -8,12 +8,12 @@ package main
 
 import (
        "bytes"
+       "encoding/json"
        "errors"
-       "exec"
        "fmt"
-       "http"
-       "json"
+       "net/http"
        "os"
+       "os/exec"
        "path/filepath"
        "regexp"
        "runtime"
index 7414a250525553e579fccf6a4138b2a543ea0bdf..3a05db20550e904d60f6074b708e8b1db4df80c8 100644 (file)
@@ -7,13 +7,13 @@ package main
 import (
        "bytes"
        "errors"
-       "exec"
        "flag"
        "fmt"
        "go/build"
        "go/token"
        "io/ioutil"
        "os"
+       "os/exec"
        "path/filepath" // use for file system paths
        "regexp"
        "runtime"
index 7445c9c207352703c1bb3b8662388cd5a87bf734..1a52ab2e72edc76a17ff2346dcc029342e232f74 100644 (file)
@@ -12,7 +12,7 @@ import (
        "go/build"
        "path" // use for import paths
        "strings"
-       "template"
+       "text/template"
 )
 
 // domake builds the package in dir.
index e8e2ec892f18ff20334c598a829fb10fa32718ec..536e01f971bcab4370109c0ffc69607edb8d700a 100644 (file)
@@ -6,7 +6,6 @@ package main
 
 import (
        "bufio"
-       "exec"
        "fmt"
        "go/ast"
        "go/build"
@@ -15,12 +14,13 @@ import (
        "go/token"
        "io/ioutil"
        "os"
+       "os/exec"
        "runtime"
        "sort"
        "strings"
        "time"
        "unicode"
-       "utf8"
+       "unicode/utf8"
 )
 
 // Environment for commands.
index e62c16feeeaeb556de22a07e8bd9ccc54cd0b9ba..ae00e49a64c528038ccb754a448e51ad44546ddf 100644 (file)
@@ -20,7 +20,7 @@ import (
        "reflect"
        "strconv"
        "strings"
-       "utf8"
+       "unicode/utf8"
 )
 
 var verbose = flag.Bool("v", false, "verbose")
index ec69340c39a429564e9ffee2fb61138b3ee35dd7..edde6cba086155c16c496005e3e1db2d3e2c3e49 100644 (file)
@@ -6,11 +6,11 @@ package main
 
 import (
        "bytes"
-       "exec"
        "flag"
        "fmt"
        "io/ioutil"
        "os"
+       "os/exec"
        "patch"
        "path/filepath"
        "sort"
index 199c782d009b08b52bd7f308371b8e3618ea4c1b..410a44e6c065ece34613b889430a470a65a37ca2 100644 (file)
@@ -11,25 +11,25 @@ package main
 
 import (
        "fmt"
-       "utf8"
+       "unicode/utf8"
 )
 
-func f(byte) {}
+func f(byte)  {}
 func g(uint8) {}
 
 func main() {
        var x float64
-       f(x)  // ERROR "byte"
-       g(x)  // ERROR "uint8"
+       f(x) // ERROR "byte"
+       g(x) // ERROR "uint8"
 
        // Test across imports.
 
        var ff fmt.Formatter
        var fs fmt.State
-       ff.Format(fs, x)  // ERROR "rune"
+       ff.Format(fs, x) // ERROR "rune"
 
-       utf8.RuneStart(x)  // ERROR "byte"
+       utf8.RuneStart(x) // ERROR "byte"
 
        var s utf8.String
-       s.At(x)  // ERROR "int"
+       s.At(x) // ERROR "int"
 }
index e59312177f4144705af7034c3c538aee134b397c..a0f21a91db64ab6f83606aed1188f9e25b0d02e2 100644 (file)
@@ -38,9 +38,9 @@ POSSIBILITY OF SUCH DAMAGE.
 package main
 
 import (
-       "big"
        "flag"
        "fmt"
+       "math/big"
 )
 
 var n = flag.Int("n", 27, "number of digits")
index 60718216712ee41d77d271748612c11970e614ad..cc2cc71000ef1171e8d6faba947d1714258006e1 100644 (file)
@@ -18,7 +18,7 @@ import (
        "fmt"
        "io"
        "os"
-       "template"
+       "text/template"
 )
 
 func main() {
index 6a67b175de1eee9f2e959d40c97bce45c4b4dba2..461ee9796ed384631bd55c37b922601aa7830082 100644 (file)
@@ -9,14 +9,14 @@
 package main
 
 import (
-       "cmath"
        "fmt"
        "math"
+       "math/cmplx"
 )
 
-type Test struct{
-       f, g    complex128
-       out     complex128
+type Test struct {
+       f, g complex128
+       out  complex128
 }
 
 var nan = math.NaN()
@@ -25,9 +25,9 @@ var negzero = math.Copysign(0, -1)
 
 func calike(a, b complex128) bool {
        switch {
-       case cmath.IsInf(a) && cmath.IsInf(b):
+       case cmplx.IsInf(a) && cmplx.IsInf(b):
                return true
-       case cmath.IsNaN(a) && cmath.IsNaN(b):
+       case cmplx.IsNaN(a) && cmplx.IsNaN(b):
                return true
        }
        return a == b
@@ -36,7 +36,7 @@ func calike(a, b complex128) bool {
 func main() {
        bad := false
        for _, t := range tests {
-               x := t.f/t.g
+               x := t.f / t.g
                if !calike(x, t.out) {
                        if !bad {
                                fmt.Printf("BUG\n")
index 1d7257521c9b5f6cb931e2a151b63ff1b60dc1a2..d0f4e09ba97b0bebea27c8faaca494d5acf5d2a2 100644 (file)
@@ -12,14 +12,14 @@ import (
        "go/ast"
        "go/parser"
        "go/token"
+       "log"
+       "net/http"
+       _ "net/http/pprof"
        "os"
        "path"
        "runtime"
        "strings"
        "time"
-       "http"
-       _ "http/pprof"
-       "log"
 )
 
 var serve = flag.String("serve", "", "serve http on this address at end")
index c3b9092cdc4dc3db569d3af41ea10ff256789d45..5a64d16b49069643839e9003590bbd05a8837f9d 100644 (file)
@@ -6,7 +6,7 @@
 
 package main
 
-import "rand"
+import "math/rand"
 
 const Count = 1e5
 
index acb8831ef70d6a6cb2641db971a951a9341b45cc..c2603a0a099c62ac996e0e5836571068713db13b 100644 (file)
@@ -6,7 +6,7 @@
 
 package main
 
-import "rand"
+import "math/rand"
 
 const Count = 1e5
 
index f014b441b2b66c85ada5b756c62069e0eb435350..726e36799a82b104e54bd6d995958de49686cdff 100644 (file)
@@ -10,7 +10,7 @@ package main
 
 import (
        "flag"
-       "rand"
+       "math/rand"
        "runtime"
        "unsafe"
 )
index 924022b48e723712463d9d57141aef92f38e980f..6a7063e239d3dc70d03a2553eaa28b8383c5289d 100644 (file)
@@ -9,7 +9,7 @@ package main
 import (
        "fmt"
        "os"
-       "utf8"
+       "unicode/utf8"
 )
 
 func main() {
index ed8a983d8f109c9c3b216817fe787f019bdd84af..9fba58156b3423bb0c900a7eba44f26433ea1dd9 100644 (file)
@@ -6,7 +6,7 @@
 
 package main
 
-import "utf8"
+import "unicode/utf8"
 
 func main() {
        var chars [6]rune