aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaushal Subedi2015-10-26 21:41:10 -0600
committerKaushal Subedi2015-10-26 21:41:10 -0600
commit24efc0991281a84bd32fbf1dab46426a28677883 (patch)
tree4a3627effcd343be04a4c1351de557970f5df763
parentfc7b97c219861ee5a9ee660b9a3263ef529b1752 (diff)
downloadgomove-24efc0991281a84bd32fbf1dab46426a28677883.tar.bz2
added better text outputs
-rw-r--r--native.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/native.go b/native.go
index 8a68880..eed2346 100644
--- a/native.go
+++ b/native.go
@@ -16,7 +16,7 @@ func ProcessFileNative(filePath string, from string, to string) {
red := ansi.ColorCode("red+bh")
white := ansi.ColorCode("white+bh")
green := ansi.ColorCode("green+bh")
- blue := ansi.ColorCode("blue+bh")
+ yellow := ansi.ColorCode("yellow+bh")
blackOnWhite := ansi.ColorCode("black+b:white+h")
//Reset the color
reset := ansi.ColorCode("reset")
@@ -108,13 +108,17 @@ func ProcessFileNative(filePath string, from string, to string) {
// Only write if changes were made
if numChages > 0 {
- fmt.Println(blue+
+ fmt.Println(yellow+
"File",
filePath,
"saved after",
numChages,
"changes",
- reset)
+ reset, "\n\n")
ioutil.WriteFile(filePath, []byte(output), os.ModePerm)
+ } else {
+ fmt.Println(yellow+
+ "No changes to write on this file.",
+ reset, "\n\n")
}
}