aboutsummaryrefslogtreecommitdiffstats
path: root/native.go
diff options
context:
space:
mode:
Diffstat (limited to 'native.go')
-rw-r--r--native.go48
1 files changed, 27 insertions, 21 deletions
diff --git a/native.go b/native.go
index 2cc7356..ada333a 100644
--- a/native.go
+++ b/native.go
@@ -52,17 +52,20 @@ func ProcessFileNative(filePath string, from string, to string) {
newImport := strings.Replace(line, from, to, -1)
output += newImport + "\n"
- numChages++
-
- fmt.Println(red+"Updating "+
- reset+white+
- line+
- reset+red+
- " to "+
- reset+white+
- newImport+
- reset+red+
- "on line", scanLine, reset)
+ if line != newImport {
+ numChages++
+
+ fmt.Println(red+"Updating "+
+ reset+white+
+ line+
+ reset+red+
+ " to "+
+ reset+white+
+ newImport+
+ reset+red+
+ "on line", scanLine, reset)
+ }
+
continue
}
@@ -79,16 +82,19 @@ func ProcessFileNative(filePath string, from string, to string) {
if isImportLine {
newImport := strings.Replace(line, from, to, -1)
output += newImport + "\n"
- numChages++
- fmt.Println(red+"Updating import "+
- reset+white+
- line+
- reset+red+
- "to"+
- reset+white+
- newImport+
- reset+red+
- "on line", scanLine, reset)
+ if line != newImport {
+ numChages++
+ fmt.Println(red+"Updating text "+
+ reset+white+
+ line+
+ reset+red+
+ " to "+
+ reset+white+
+ newImport+
+ reset+red+
+ " on line", scanLine, reset)
+
+ }
continue
}