Authentication-Results: mail-b.sr.ht; dkim=pass header.d=adnano.co header.i=@adnano.co Received: from out1.migadu.com (out1.migadu.com [91.121.223.63]) by mail-b.sr.ht (Postfix) with ESMTPS id 5F88811EFF3 for <~adnano/go-gemini-devel@lists.sr.ht>; Sun, 21 Feb 2021 13:56:53 +0000 (UTC) MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adnano.co; s=key1; t=1613915811; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to; bh=b4K2xc8PVI4EhRmZJx3tR5kET8WoHOBSDsnBqjwYQgo=; b=IEg0e5WlgUmtApaqn6xQiXYZYix4lq6B2ZR7FYcjR99q2F+7fiTC0xpa+RK12q1A6e8XTG zm7XsksynMJsG42/KeWAtbGoYF+cui8tKsow5hWl6K0ipXYUPoix56xdpjtMb9JEYNHpFP nKlfj76Y78ytUTE4VtUNwYLFwjlh8LW0V3Zl05XUW2pG42z+qgU0zUiL6T8yEcbYWndtWg zdLtsy5angt8jdZ+pgwW9FZVV1tsJFodCFO8mmrnLzB5SlLyGKh9z8hIlR/IhrXlmCH1Vf 4Z9oqLNbYEG2wtJc+9jLwEDzzhA9kVXktsSc/I5wkfVLQSbrymqxT5SIdc5Tbw== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "Adnan Maolood" To: "Drew DeVault" , <~adnano/go-gemini-devel@lists.sr.ht> Cc: Subject: Re: Seeking feedback for version v0.1.15 Date: Sun, 21 Feb 2021 08:45:11 -0500 Message-Id: In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: me@adnano.co On Sun Feb 21, 2021 at 8:41 AM EST, Drew DeVault wrote: > I love it. I based gemini://srht.pages on this WIP stuff. I'm looking > forward to updating it with contexts as well once you release those. Thanks! You can try the new API in version v0.1.15-alpha. > You could also consider mimicking the net/http approach by stashing the > context in the Request type. I could, however this makes creating derivative contexts more difficult. One must call Request.Context(), and then call Request.WithContext with the derived context, which must copy the request. Also note that the http Handler API was in use before the introduction of contexts, so they had to implement that API for backwards compatibility. Since we don't have to worry about that yet, I think we can come up with a better approach. Also, the documentation for the context package says: Do not store Contexts inside a struct type; instead, pass a Context explicitly to each function that needs it. The Context should be the first parameter, typically named ctx. Another possible aproach would be to combine the ResponseWriter and Request arguments into one. > > - FileSystem replaced with io/fs.FS. This means we now require Go 1.16. > > Already noticed this and worked around it, but I would like to humbly > request that in the future you take care with rushing in to adopt new Go > features. We run the latest Alpine stable in production and I prefer not > to pull down newer versions of packages unless it's strictly necessary. > They release biannually so the wait isn't too terribly long. I'll keep that in mind. I don't expect to adopt any new Go features anytime soon.