terraform-provider-stackitp.../generator/cmd/publish/gpg.go
Marcel S. Henselin 5958474f9a
Some checks failed
CI Workflow / Check GoReleaser config (pull_request) Successful in 4s
CI Workflow / Test readiness for publishing provider (pull_request) Failing after 14s
CI Workflow / CI run build and linting (pull_request) Failing after 10s
CI Workflow / Code coverage report (pull_request) Has been skipped
CI Workflow / CI run tests (pull_request) Failing after 57s
fix: code cleanup
2026-03-02 10:32:58 +01:00

14 lines
281 B
Go

package publish
import (
"fmt"
"strings"
)
func (p *Provider) ReadGpgFile() (string, error) {
gpgFile, err := ReadFile(p.GpgPubKeyFile)
if err != nil {
return "", fmt.Errorf("error reading '%s' file: %w", p.GpgPubKeyFile, err)
}
return strings.Join(gpgFile, "\n"), nil
}