Re: [go-nuts] Licence details of github.com/golang/sync

2020-10-30 Thread 'Dan Kortschak' via golang-nuts
On Thu, 2020-10-29 at 22:54 -0700, Ian Lance Taylor wrote: > On Thu, Oct 29, 2020, 10:48 PM Denis Cheremisov < > denis.cheremi...@gmail.com> wrote: > > Well, as usual I wrote something in the way, not the real thing. > > > > The case is: > > > > - At my company we are using errgroup from that

[go-nuts] Snake, Kebab, Camel, Pascal Case Conversion

2020-10-30 Thread Kaveh Shahbazian
caseconv is a Go Module for string case conversion - snake, kebab, camel, pascal cases. Please open an issue if you have found any bugs. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from

[go-nuts] Why must a HTTP handler not modify the request?

2020-10-30 Thread Matthew Byrne
The net/http documentation says "Except for reading the body, handlers should not modify the provided Request". I am writing a proxy and I would like to know more about why this is forbidden. Is it just a matter of good hygiene or is there a risk of something more serious like a race

[go-nuts] Structs for JSON APIs and required fields... using pointers

2020-10-30 Thread Trig
What is the standard practice between required fields of a struct you're expecting to deserialize using JSON, and using pointers for this (if there's any correlation)? API defined a string as required. Do you define it as a string and check for zero-value for that type, or *string and check

[go-nuts] Count of actually "processed" bytes from csv.Reader

2020-10-30 Thread Severyn Lisovsky
Hi, I have difficulty counting bytes that were processed by csv.Reader because it reads from internally created bufio.Reader. If I pass some counting reader to csv.NewReader it will show not the actual number bytes "processed" by csv.Reader to receive the output I get calling csv.Reader.Read

[go-nuts] Re: Licence details of github.com/golang/sync

2020-10-30 Thread Space A.
Are you creating your own programming language and tools and going to release it under own license terms? If not, and you're using this lib only to program your projects, there are no restrictions. четверг, 29 октября 2020 г. в 16:52:17 UTC+3, Denis Cheremisov: > Hi! > At my job we found

Re: [go-nuts] Structs for JSON APIs and required fields... using pointers

2020-10-30 Thread Marcin Romaszewicz
I don't know if there's any standard practice to it. If the meaning of the zero value and "not present" is different in your application, then clearly, you can't use the zero value as you can't tell them apart, while you can with a pointer. The sql package does it with a version of optionals