Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(4577)

Unified Diff: src/cmd/gofix/signal.go

Issue 5305066: code review 5305066: gofix: error fix (Closed)
Patch Set: diff -r 2be61232b4e2 https://go.googlecode.com/hg/ Created 13 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cmd/gofix/reflect.go ('k') | src/cmd/gofix/typecheck.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/gofix/signal.go
===================================================================
--- a/src/cmd/gofix/signal.go
+++ b/src/cmd/gofix/signal.go
@@ -32,16 +32,14 @@
sel := s.Sel.String()
if sel == "Signal" || sel == "UnixSignal" || strings.HasPrefix(sel, "SIG") {
+ addImport(f, "os")
s.X = &ast.Ident{Name: "os"}
fixed = true
}
})
- if fixed {
- addImport(f, "os")
- if !usesImport(f, "os/signal") {
- deleteImport(f, "os/signal")
- }
+ if fixed && !usesImport(f, "os/signal") {
+ deleteImport(f, "os/signal")
}
return
}
« no previous file with comments | « src/cmd/gofix/reflect.go ('k') | src/cmd/gofix/typecheck.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b