Commit 67dd37eb28fb58aba941b36b223578110d3e9635

Parents: aa5dfe1f143d726012505f2c61f8937d098189d6

From: Moritz Poldrack <ich@moritz-poldrack.de>
Date: Tue Jun 22 09:52:11 2021 +0700

fixed bug created during code cleanup

		

Stats

colorsfg.go +5/-5

Changeset

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
diff --git a/colorsfg.go b/colorsfg.go
index c7dbddd43cf9b1dfb3fb980df213721c1ead86ce..35541c39273c870732169e90eee423f738dff102 100644
--- a/colorsfg.go
+++ b/colorsfg.go
@@ -29,15 +29,15 @@ 	return SetRed() + fmt.Sprint(content...) + UnsetRed()
 }
 
 // SetRed sets the foreground color to red
-var SetRed func() string = UnsetBlack
-
-// UnsetRed resets the foreground color from red to default.
-func UnsetRed() string {
+func SetRed() string {
 	if nocolorIsSet {
 		return ""
 	}
-	return escape + resetfg + set
+	return escape + redfg + set
 }
+
+// UnsetRed resets the foreground color from red to default.
+var UnsetRed func() string = UnsetBlack
 
 // Green wraps the content in ANSI codes to make its foreground color green
 func Green(content ...interface{}) string {