In case you have some content to download from a remote server, which also provides PGP signature download, than you can use this go package to verify signature before using the content from remote server
import (
"context"
"fmt"
"log"
"github.com/antontsv/sigdown"
)
func main() {
url := "https://git.io/all.files"
sigurl := url + ".asc"
// Value of testKey for this example is here:
// https://github.com/antontsv/sigdown/blob/master/example_test.go#L33
downloader, err := sigdown.New(testKey)
if err != nil {
log.Fatalf("unexpected error while creating downloader: %v", err)
}
download, err := downloader.Download(context.Background(), url, sigurl)
if err != nil {
log.Fatalf("failed to download %s with signature verification, error: %v", url, err)
}
fmt.Println(download.Content)
}