aboutsummaryrefslogtreecommitdiffstats
path: root/native.go
diff options
context:
space:
mode:
authorKaushal Subedi2015-10-26 21:58:51 -0600
committerKaushal Subedi2015-10-26 21:58:51 -0600
commitaadf030096b68f14a3cc52f648846c281f535b08 (patch)
tree22294188764a8354f15893c944daa6ef39368e55 /native.go
parent24efc0991281a84bd32fbf1dab46426a28677883 (diff)
downloadgomove-aadf030096b68f14a3cc52f648846c281f535b08.tar.bz2
minor fixes
Diffstat (limited to 'native.go')
-rw-r--r--native.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/native.go b/native.go
index eed2346..92be282 100644
--- a/native.go
+++ b/native.go
@@ -35,7 +35,7 @@ func ProcessFileNative(filePath string, from string, to string) {
// Track line that is being scanned
scanLine := 0
// Track number of changes in file
- numChages := 0
+ numChanges := 0
// Control variables
isImportLine := false
@@ -56,7 +56,7 @@ func ProcessFileNative(filePath string, from string, to string) {
newImport := strings.Replace(line, from, to, -1)
output += newImport + "\n"
if line != newImport {
- numChages++
+ numChanges++
fmt.Println(red+"Updating "+
reset+white+
@@ -86,7 +86,7 @@ func ProcessFileNative(filePath string, from string, to string) {
newImport := strings.Replace(line, from, to, -1)
output += newImport + "\n"
if line != newImport {
- numChages++
+ numChanges++
fmt.Println(red+"Updating text "+
reset+white+
strings.TrimSpace(line)+
@@ -107,12 +107,12 @@ func ProcessFileNative(filePath string, from string, to string) {
}
// Only write if changes were made
- if numChages > 0 {
+ if numChanges > 0 {
fmt.Println(yellow+
"File",
filePath,
"saved after",
- numChages,
+ numChanges,
"changes",
reset, "\n\n")
ioutil.WriteFile(filePath, []byte(output), os.ModePerm)