[go-nuts] Re: copy resp.Body to *bytes.Buffer

2021-10-07 Thread 'Ross Light' via golang-nuts
Use io.Copy . Example: https://play.golang.org/p/89KkmplfZ4M -Ross On Thursday, October 7, 2021 at 5:13:17 AM UTC-7 RS wrote: > How can I copy resp.Body to a *bytes.Buffer? > > I am new to go. > resp.Body is the response which I get from client.Do, and is of type

Re: [go-nuts] could anybody tell me where to find golang implicit optimize?

2021-07-24 Thread Ross Light
I have no idea how well-maintained this page is, but there is https://github.com/golang/go/wiki/CompilerOptimizations On Thursday, July 22, 2021 at 10:17:45 PM UTC-7 qq451...@gmail.com wrote: > thanks for reply > > regards > cheng > > On Friday, July 23, 2021 at 12:44:21 PM UTC+8 Ian Lance Taylo

Re: [go-nuts] Does anyone konw which proposal changes the access for embeded field name of struct?

2021-06-07 Thread Ross Light
https://golang.org/issue/9859 is a proposal to support such syntax, but it hasn't really moved in a long time. On Monday, June 7, 2021 at 2:47:07 AM UTC-7 axel.wa...@googlemail.com wrote: > What we are saying is that you are misremembering. That's not how Go ever > worked. > > On Mon, Jun 7, 20

Re: [go-nuts] New advanced, CGo-free SQLite package

2021-05-01 Thread Ross Light
his. I am curious what's the difference > between your fork and the original repo (which is now gone it seems)? > > On Fri, Apr 30, 2021 at 11:42 PM Ross Light > wrote: > > > > I've created a new Go package for SQLite: zombiezen.com/go/sqlite > > > > I

[go-nuts] New advanced, CGo-free SQLite package

2021-04-30 Thread Ross Light
I've created a new Go package for SQLite: zombiezen.com/go/sqlite It is a fork of crawshaw.io/sqlite that uses modernc.org/sqlite , a CGo-free SQLite package. It aims to be a most

[go-nuts] Re: Context on one-shot structs

2021-01-15 Thread Ross Light
The Go CDK stores a Context in a struct while performing I/O: https://pkg.go.dev/gocloud.dev/blob#Bucket.NewWriter It could be argued that this is done for compatibility with the io.Reader and io.Writer interfaces. However, I think this pattern, used sparingly, is suitable for API interactions

[go-nuts] Clean shutdown when blocked on I/O

2020-07-06 Thread Ross Light
See https://golang.org/issue/20280 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web vi

[go-nuts] Re: OAuth2 token expiry logic

2020-04-22 Thread Ross Light
Round(0) ensures that the expiry is being compared to the wall clock time, since that's what the server uses to verify. If you're interested, you can look at https://golang.org/cl/83575, the commit that introduced this logic. -- You received this message because you are subscribed to the Googl

[go-nuts] New GraphQL server library for Go

2019-11-19 Thread Ross Light
Hey gophers, I wanted to share a new GraphQL server library that I've been working on. The project is at github.com/zombiezen/graphql-server, and you can read the announcement blog post for the motivation behind it and how

[go-nuts] Re: [go-cloud] What is recommended way to initialize and keep prepared statements in go Lang

2019-04-15 Thread 'Ross Light' via golang-nuts
(+cc golang-nuts, +bcc go-cloud) go-cloud is for the discussion of the Go CDK . This sounds like a more general Go question, so redirecting you over to golang-nuts. -Ross On Mon, Apr 15, 2019 at 12:52 PM Shrinath agarwal wrote: > Hi Team ,I am new in Go lang .I am trying

Re: [go-nuts] Google Cloud Golang SDK authentication

2017-11-27 Thread 'Ross Light' via golang-nuts
Hi Salman, There are broadly two types of authorization on GCP: user accounts and service accounts. User account tokens will act on behalf of a particular end-user, and service account tokens will act on behalf of that service account. I'm not exactly sure which one is right for your applicatio