~chrisppy/beagles

212c8b24594f3f00006bfd69ab8371f93c69b3f5 — Chris Palmer 6 months ago db9c98d
update go-gemini to v0.1.17
3 files changed, 12 insertions(+), 12 deletions(-)

M go.mod
M go.sum
M util/util.go
M go.mod => go.mod +2 -2
@@ 5,7 5,7 @@ go 1.15
replace gitlab.com/tslocum/cview v1.5.3 => git.sr.ht/~chrisppy/cview v0.0.0-20210214173831-cf2c15f351a7

require (
	git.sr.ht/~adnano/go-gemini v0.1.16
	git.sr.ht/~adnano/go-gemini v0.1.17
	git.sr.ht/~chrisppy/go-barefeed v0.1.0
	git.sr.ht/~chrisppy/go-opml v1.0.0
	git.sr.ht/~emersion/go-scfg v0.0.0-20201019143924-142a8aa629fc


@@ 21,6 21,6 @@ require (
	gitlab.com/tslocum/cbind v0.1.4
	gitlab.com/tslocum/cview v1.5.3
	go.etcd.io/bbolt v1.3.5
	golang.org/x/sys v0.0.0-20210223212115-eede4237b368 // indirect
	golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073 // indirect
	gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 // indirect
)

M go.sum => go.sum +4 -4
@@ 1,5 1,5 @@
git.sr.ht/~adnano/go-gemini v0.1.16 h1:zCuChm4uqhumHE6Ek1UMG+OqV8nMq4aQgqWr3Yotxqs=
git.sr.ht/~adnano/go-gemini v0.1.16/go.mod h1:hQ75Y0i5jSFL+FQ7AzWVAYr5LQsaFC7v3ZviNyj46dY=
git.sr.ht/~adnano/go-gemini v0.1.17 h1:CJ3tDaqAJQbOdVXmiPC/iXHt4lF/CRu2nxPNOPjHUBk=
git.sr.ht/~adnano/go-gemini v0.1.17/go.mod h1:hQ75Y0i5jSFL+FQ7AzWVAYr5LQsaFC7v3ZviNyj46dY=
git.sr.ht/~chrisppy/cview v0.0.0-20210214173831-cf2c15f351a7 h1:OKIPsl2z9OsQDm8jnQfbwJDl0GakXJLhtBnTkbT6PW0=
git.sr.ht/~chrisppy/cview v0.0.0-20210214173831-cf2c15f351a7/go.mod h1:lCEqP/zDhBihNbyiEn59LgOCk09ejefHaS7kNZ57Nmc=
git.sr.ht/~chrisppy/go-barefeed v0.1.0 h1:kyf1sJx4uGLesiXagd4sCP9C8+TPge+y/VxFTX6dI4E=


@@ 95,8 95,8 @@ golang.org/x/sys v0.0.0-20201013132646-2da7054afaeb/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201211090839-8ad439b19e0f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210223212115-eede4237b368 h1:fDE3p0qf2V1co1vfj3/o87Ps8Hq6QTGNxJ5Xe7xSp80=
golang.org/x/sys v0.0.0-20210223212115-eede4237b368/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073 h1:8qxJSnu+7dRq6upnbntrmriWByIakBuct5OM/MdQC1M=
golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf h1:MZ2shdL+ZM/XzY3ZGOnh4Nlpnxz5GSOhOmtHo3iPU6M=
golang.org/x/term v0.0.0-20201210144234-2321bbc49cbf/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=

M util/util.go => util/util.go +6 -6
@@ 136,17 136,17 @@ func ParseFeed(path string, gmniPath string) (f *gofeed.Feed, err error) {
		}

		defer func() {
			if err = rsp.Close(); err != nil {
			if err = rsp.Body.Close(); err != nil {
				return
			}
		}()

		if rsp.Status().Class() != gemini.StatusSuccess {
			err = fmt.Errorf("%d for %s", rsp.Status().Class(), path)
		if rsp.Status.Class() != gemini.StatusSuccess {
			err = fmt.Errorf("%d for %s", rsp.Status.Class(), path)
			return
		}

		r = rsp
		r = rsp.Body
	default:
		var b []byte
		b, err = ioutil.ReadFile(filepath.Clean(path))


@@ 169,14 169,14 @@ func do(client *gemini.Client, req *gemini.Request, via []*gemini.Request) (*gem
		return resp, err
	}

	switch resp.Status().Class() {
	switch resp.Status.Class() {
	case gemini.StatusRedirect:
		via = append(via, req)
		if len(via) > 5 {
			return resp, fmt.Errorf("too many redirects")
		}

		target, err := url.Parse(resp.Meta())
		target, err := url.Parse(resp.Meta)
		if err != nil {
			return resp, err
		}