fix: fix releaser to use correct string format in gpg strings #22
1 changed files with 2 additions and 8 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue