From 1b0ad32b6b8e436af379a345572a437fa2e06a6b Mon Sep 17 00:00:00 2001 From: EnumDev Date: Mon, 22 Dec 2025 13:53:14 +0200 Subject: [PATCH] Trim last newline character from ascii art --- src/system.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/system.go b/src/system.go index c9ad51c..cdb0138 100644 --- a/src/system.go +++ b/src/system.go @@ -63,7 +63,7 @@ func GetDistroAsciiArt() string { // \ \ (| | ) /'\_ _/'\ -\___)=(___/ ` +\___)=(___/` // Get ascii name to use var asciiName string @@ -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") } }