From 8943dd7cf8d4604ecf031a913c2e64ff95564a5b Mon Sep 17 00:00:00 2001 From: "parag.jain" Date: Thu, 28 Nov 2024 15:12:38 +0530 Subject: [PATCH] remove TrimSuffix and replaced with trimspace --- cmd/suseconnect/suseconnect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/suseconnect/suseconnect.go b/cmd/suseconnect/suseconnect.go index 3a347fb7..b5cc969e 100644 --- a/cmd/suseconnect/suseconnect.go +++ b/cmd/suseconnect/suseconnect.go @@ -437,7 +437,7 @@ func readTokenFromReader(reader io.Reader) (string, error) { if err != nil && err != io.EOF { return "", fmt.Errorf("failed to read token from reader: %w", err) } - token := strings.TrimSuffix(tokenBytes, "\n") + token := strings.TrimSpace(tokenBytes) if token == "" { return "", fmt.Errorf("error: token cannot be empty after reading") }