~sircmpwn/godocs.io

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH gddo v2] gddo-server: Fix panic on nil pointer dereference

Details
Message ID
<20210430161842.10429-1-me@adnano.co>
DKIM signature
pass
Download raw message
Patch: +8 -6
---
The other patch messed up the error handling.

 gddo-server/crawl.go | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/gddo-server/crawl.go b/gddo-server/crawl.go
index 573e0d4..bf66d4b 100644
--- a/gddo-server/crawl.go
+++ b/gddo-server/crawl.go
@@ -48,17 +48,19 @@ func (s *Server) crawl(ctx context.Context, modulePath string) (database.Module,

	// Get latest version
	var latest string
	var err error
	if modulePath == stdlib.ModulePath {
		var err error
		latest, err = stdlib.ZipInfo(proxy.LatestVersion)
		if err != nil {
			return database.Module{}, err
		}
	} else {
		var info *proxy.VersionInfo
		info, err = s.proxyClient.GetInfo(ctx, modulePath, proxy.LatestVersion)
		info, err := s.proxyClient.GetInfo(ctx, modulePath, proxy.LatestVersion)
		if err != nil {
			return database.Module{}, err
		}
		latest = info.Version
	}
	if err != nil {
		return database.Module{}, err
	}

	seriesPath, _, _ := module.SplitPathVersion(modulePath)

-- 
2.31.1
Details
Message ID
<CB177I7O0A39.QIFWUHX5G36D@taiga>
In-Reply-To
<20210430161842.10429-1-me@adnano.co> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
Thanks!

To git@git.sr.ht:~sircmpwn/gddo
   24ba5a5..2923634  master -> master
Reply to thread Export thread (mbox)