Skip to content

Commit 5ac9850

Browse files
author
wintrmvte
committed
Changed format of Print...() functions
1 parent 55307cf commit 5ac9850

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

coldfire.go

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -70,40 +70,28 @@ func getNTPTime() time.Time {
7070
func PrintGood(msg string) {
7171
dt := time.Now()
7272
t := dt.Format("15:04")
73-
fmt.Printf("[%s] %s :: %s \n", Green(t), Green(Bold("[+]")), msg)
73+
fmt.Printf("[%s] ~ %s \n", Green(t), msg)
7474
}
7575

7676
// PrintInfo is used to print output containing information.
7777
func PrintInfo(msg string) {
7878
dt := time.Now()
7979
t := dt.Format("15:04")
80-
fmt.Printf("[%s] [*] :: %s\n", t, msg)
80+
fmt.Printf("[%s] ~ %s\n", t, msg)
8181
}
8282

8383
// PrintError is used to print output indicating failure.
8484
func PrintError(msg string) {
8585
dt := time.Now()
8686
t := dt.Format("15:04")
87-
fmt.Printf("[%s] %s :: %s \n", Red(t), Red(Bold("[x]")), msg)
87+
fmt.Printf("[%s] ~ %s \n", Red(t), msg)
8888
}
8989

9090
// PrintWarning is used to print output indicating potential failure.
9191
func PrintWarning(msg string) {
9292
dt := time.Now()
9393
t := dt.Format("15:04")
94-
fmt.Printf("[%s] %s :: %s \n", Yellow(t), Yellow(Bold("[!]")), msg)
95-
}
96-
97-
// File2Slice reads a textfile and returns all lines as an array.
98-
func File2Slice(file string) []string {
99-
fil, _ := os.Open(file)
100-
defer fil.Close()
101-
var lines []string
102-
scanner := bufio.NewScanner(fil)
103-
for scanner.Scan() {
104-
lines = append(lines, scanner.Text())
105-
}
106-
return lines
94+
fmt.Printf("[%s] - %s \n", Yellow(t), msg)
10795
}
10896

10997
// Returns true if a file is executable

0 commit comments

Comments
 (0)