summaryrefslogtreecommitdiff
path: root/src/cmd/gofix/netdial.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/gofix/netdial.go')
-rw-r--r--src/cmd/gofix/netdial.go15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/cmd/gofix/netdial.go b/src/cmd/gofix/netdial.go
index afa98953b..2de994cff 100644
--- a/src/cmd/gofix/netdial.go
+++ b/src/cmd/gofix/netdial.go
@@ -8,8 +8,15 @@ import (
"go/ast"
)
+func init() {
+ register(netdialFix)
+ register(tlsdialFix)
+ register(netlookupFix)
+}
+
var netdialFix = fix{
"netdial",
+ "2011-03-28",
netdial,
`Adapt 3-argument calls of net.Dial to use 2-argument form.
@@ -19,6 +26,7 @@ http://codereview.appspot.com/4244055
var tlsdialFix = fix{
"tlsdial",
+ "2011-03-28",
tlsdial,
`Adapt 4-argument calls of tls.Dial to use 3-argument form.
@@ -28,6 +36,7 @@ http://codereview.appspot.com/4244055
var netlookupFix = fix{
"netlookup",
+ "2011-03-28",
netlookup,
`Adapt 3-result calls to net.LookupHost to use 2-result form.
@@ -35,12 +44,6 @@ http://codereview.appspot.com/4244055
`,
}
-func init() {
- register(netdialFix)
- register(tlsdialFix)
- register(netlookupFix)
-}
-
func netdial(f *ast.File) bool {
if !imports(f, "net") {
return false