From 7f07a50bfd191d7cf916c10411a8d55e31e067f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20=C5=A0trauch?= Date: Thu, 13 Apr 2023 22:54:14 +0200 Subject: [PATCH] Host key refactoring --- containers/types.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/containers/types.go b/containers/types.go index 8aec98c..1feabc6 100644 --- a/containers/types.go +++ b/containers/types.go @@ -291,7 +291,8 @@ func (c *Container) GetHostKey() (string, error) { } if hostKeyRaw != nil { - parts := strings.SplitN(string(*hostKeyRaw), " ", 1) + hostKeyRawString := strings.TrimSpace(string(*hostKeyRaw)) + parts := strings.SplitN(hostKeyRawString, " ", 1) if len(parts) > 1 { return parts[1], nil }