mirror of
https://github.com/EnumeratedDev/stormfetch.git
synced 2026-09-15 23:46:12 +00:00
Trim last newline character from ascii art
This commit is contained in:
+2
-2
@@ -80,7 +80,7 @@ func GetDistroAsciiArt() string {
|
||||
if err == nil {
|
||||
if _, err := os.Stat(path.Join(userConfDir, "stormfetch/ascii/", asciiName)); err == nil {
|
||||
if bytes, err := os.ReadFile(path.Join(userConfDir, "stormfetch/ascii/", asciiName)); err == nil {
|
||||
return string(bytes)
|
||||
return strings.TrimRight(string(bytes), "\n")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,7 +88,7 @@ func GetDistroAsciiArt() string {
|
||||
// Check for ascii art in system config directory
|
||||
if _, err := os.Stat(path.Join(SystemConfigDir, "stormfetch/ascii/", asciiName)); err == nil {
|
||||
if bytes, err := os.ReadFile(path.Join(SystemConfigDir, "stormfetch/ascii/", asciiName)); err == nil {
|
||||
return string(bytes)
|
||||
return strings.TrimRight(string(bytes), "\n")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user