about summary refs log tree commit diff
diff options
context:
space:
mode:
authoremile <hanemile@protonmail.com>2018-10-08 17:42:51 +0200
committeremile <hanemile@protonmail.com>2018-10-08 17:42:51 +0200
commite9f221892d5722ebc738138f504d080b08b7d9ff (patch)
treeaa769fd266d8af49457014a4891b84b1699ea1c2
parent929da9cff24a3853563adb950eea057c16a404fe (diff)
Fancy logging (Bad Function)
-rw-r--r--.gitignore5
-rw-r--r--llog/llog.go15
2 files changed, 18 insertions, 2 deletions
diff --git a/.gitignore b/.gitignore
index 75eef4a..1635740 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@
 # Folders
 _obj
 _test
+data
 
 # Architecture specific extensions/prefixes
 *.[568vq]
@@ -23,6 +24,6 @@ _testmain.go
 *.exe
 *.test
 *.prof
+*.csv
+
 
-# Stardata
-.csv
diff --git a/llog/llog.go b/llog/llog.go
new file mode 100644
index 0000000..e02af74
--- /dev/null
+++ b/llog/llog.go
@@ -0,0 +1,15 @@
+package llog
+
+import (
+	"fmt"
+)
+
+// Good prints a "good" (green) message with a timestamp and the given message
+func Good(text string) {
+	fmt.Printf("\033[36m [+] \033[0m%-60s\t", text)
+}
+
+// Bad prints a "good" (green) message with a timestamp and the given message
+func Bad(text string) {
+	fmt.Printf("\033[31m [+] \033[0m%-60s\t", text)
+}