fix: fix releaser to use correct string format in gpg strings #22

Merged
marcel.henselin merged 1 commit from fix/gpg_string_format into alpha 2026-01-30 13:50:40 +00:00

View file

@ -2,19 +2,13 @@ package publish
import (
"fmt"
"strings"
)
func (p *Provider) ReadGpgFile() (string, error) {
// Get contents of GPG key
gpgFile, err := ReadFile(p.GpgPubKeyFile)
if err != nil {
return "", fmt.Errorf("error reading '%s' file: %w", p.GpgPubKeyFile, err)
}
// loop through every line and stick with \\n
gpgAsciiPub := ""
for _, line := range gpgFile {
gpgAsciiPub = gpgAsciiPub + line + "\\n"
}
return gpgAsciiPub, nil
return strings.Join(gpgFile, "\n"), nil
}