Host key refactoring
continuous-integration/drone/push Build is passing Details

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
1 changed files with 2 additions and 1 deletions

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
}