Host key refactoring
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Adam Štrauch 2023-04-13 22:54:14 +02:00
parent 036aa4fc28
commit 7f07a50bfd
Signed by: cx
GPG Key ID: 018304FFA8988F8D

View File

@ -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
}