]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/fix: add runtime renamings
authorRuss Cox <rsc@golang.org>
Sun, 19 Feb 2012 21:10:45 +0000 (16:10 -0500)
committerRuss Cox <rsc@golang.org>
Sun, 19 Feb 2012 21:10:45 +0000 (16:10 -0500)
R=golang-dev, dsymonds, r
CC=golang-dev
https://golang.org/cl/5685043

src/cmd/fix/go1rename.go
src/cmd/fix/go1rename_test.go

index 5d12f1870129f1d7e897ad9d02c1485768a7b448..2995880c300667f97f9f9d53e434a538c2afa189 100644 (file)
@@ -56,4 +56,16 @@ var go1renameReplace = []rename{
                Old:       "os.Exec",
                New:       "syscall.Exec",
        },
+       {
+               OldImport: "runtime",
+               NewImport: "",
+               Old:       "runtime.Cgocalls",
+               New:       "runtime.NumCgoCall",
+       },
+       {
+               OldImport: "runtime",
+               NewImport: "",
+               Old:       "runtime.Goroutines",
+               New:       "runtime.NumGoroutine",
+       },
 }
index 0a7dcf46cfa59090a9546e5650385c69c4469a5a..02eaea6a541965bdf79bbda27eb30588e89b0d39 100644 (file)
@@ -18,6 +18,7 @@ import (
        "crypto/des"
        "net/url"
        "os"
+       "runtime"
 )
 
 var (
@@ -29,6 +30,8 @@ var (
        _ = url.ParseWithReference
        _ = url.ParseRequest
        _ = os.Exec
+       _ = runtime.Cgocalls
+       _ = runtime.Goroutines
 )
 `,
                Out: `package main
@@ -37,6 +40,7 @@ import (
        "crypto/aes"
        "crypto/cipher"
        "net/url"
+       "runtime"
        "syscall"
 )
 
@@ -49,6 +53,8 @@ var (
        _ = url.Parse
        _ = url.ParseRequestURI
        _ = syscall.Exec
+       _ = runtime.NumCgoCall
+       _ = runtime.NumGoroutine
 )
 `,
        },