From 1c640990a2af1bb5d7ff04f6512aa55a35f10779 Mon Sep 17 00:00:00 2001 From: adnano Date: Sat, 24 Oct 2020 17:11:30 -0400 Subject: [PATCH] Update dependency --- go.mod | 2 +- go.sum | 4 ++-- main.go | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/go.mod b/go.mod index e287cd5..a94e4c4 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module kiln go 1.15 -require git.sr.ht/~adnano/gmi v0.1.0-alpha.1 +require git.sr.ht/~adnano/go-gemini v0.1.0 diff --git a/go.sum b/go.sum index 8a68e97..bab6f79 100644 --- a/go.sum +++ b/go.sum @@ -1,2 +1,2 @@ -git.sr.ht/~adnano/gmi v0.1.0-alpha.1 h1:5sha5ucev32U95drEEaPw9rm6hGWJtL8y5HViQ3VDJQ= -git.sr.ht/~adnano/gmi v0.1.0-alpha.1/go.mod h1:t/m2KtH+7lXIF7jjVN+bNvwPbE0nxHOpvlA/WZ/KeLQ= +git.sr.ht/~adnano/go-gemini v0.1.0 h1:UqRT90kR+/8q5s/JemmDPH6A9VocBezIuWbOpZYBypU= +git.sr.ht/~adnano/go-gemini v0.1.0/go.mod h1:If1VxEWcZDrRt5FeAFnGTcM2Ud1E3BXs3VJ5rnZWKq0= diff --git a/main.go b/main.go index e2345e5..f2e0a0d 100644 --- a/main.go +++ b/main.go @@ -13,7 +13,7 @@ import ( "text/template" "time" - "git.sr.ht/~adnano/gmi" + "git.sr.ht/~adnano/go-gemini" ) const ( @@ -152,13 +152,13 @@ func run() error { // serve the site func serve() error { - server := &gmi.Server{} - cert, err := gmi.NewCertificate("localhost", time.Hour) + var server gemini.Server + cert, err := gemini.NewCertificate("localhost", time.Hour) if err != nil { return err } server.CertificateStore.Add("localhost", cert) - server.Handle("localhost", gmi.FileServer(gmi.Dir("dst"))) + server.Register("localhost", gemini.FileServer(gemini.Dir("dst"))) return server.ListenAndServe() } @@ -445,7 +445,7 @@ func outputHTML(p *Page) (path string, content []byte) { path = filepath.Join(p.Permalink, indexPath) r := bytes.NewReader(p.content) - text := gmi.Parse(r) + text := gemini.Parse(r) content = []byte(text.HTML()) type tmplCtx struct {