go-gemini/examples/cert/cert.go

23 lines
291 B
Go
Raw Normal View History

2020-09-27 17:50:48 +00:00
// +build example
package main
import (
"log"
"git.sr.ht/~adnano/go-gemini"
)
func main() {
host := "localhost"
crt, key, err := gemini.NewCertificate(host)
if err != nil {
log.Fatal(err)
}
if err := gemini.WriteCertificate(host, crt, key); err != nil {
log.Fatal(err)
}
}