[go-nuts] encoding/json character escaping question

2019-10-05 Thread nanmu42
You can disable this behavior, this link may help: https://go-review.googlesource.com/c/go/+/21796/ -- 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

Re: [go-nuts] encoding/json character escaping question

2019-10-05 Thread Poussier William
Thank you David for the detailled answer. Le samedi 5 octobre 2019 20:48:11 UTC+2, David Finkel a écrit : > > > > On Thu, Oct 3, 2019 at 11:11 AM Poussier William > wrote: > >> Hello >> >> The encoding/json package escapes 0xA (line feed), 0xD (carriage return) >> and 0x9 (horizontal tab) using

Re: [go-nuts] encoding/json character escaping question

2019-10-05 Thread David Finkel
On Thu, Oct 3, 2019 at 11:11 AM Poussier William wrote: > Hello > > The encoding/json package escapes 0xA (line feed), 0xD (carriage return) > and 0x9 (horizontal tab) using the escape character '\'. However, when it > comes to 0x8 (backspace) and 0xc (form feed), it uses the Unicode escape >

Re: [go-nuts] Re: An old problem: lack of priority select cases

2019-10-05 Thread T L
On Saturday, October 5, 2019 at 6:28:37 AM UTC-4, ohir wrote: > > On Fri, 4 Oct 2019 15:15:30 -0700 (PDT) > T L > wrote: > > > > If your out <-v must be dependent of ctx.Done not being ready you > > > must resolve this dependency by other means. Eg. by selecting for it > > > in separate

[go-nuts] using ast ang go type to rewrite method

2019-10-05 Thread Yulrizka
hi For an experiment, I'm trying to rewrite a method call to use a different package. for example package main import "github.com/pkg/errors" func main() { err := errors.New("original error") errors.Wrap(err, "wrapped error") } into package main import ( "errors" "fmt" )

Re: [go-nuts] Re: An old problem: lack of priority select cases

2019-10-05 Thread Wojciech S. Czarnecki
On Fri, 4 Oct 2019 15:15:30 -0700 (PDT) T L wrote: > > If your out <-v must be dependent of ctx.Done not being ready you > > must resolve this dependency by other means. Eg. by selecting for it > > in separate select before. > > > It is not a must. It just tries to select ctx.Done if

Re: [go-nuts] Re: An old problem: lack of priority select cases

2019-10-05 Thread Wojciech S. Czarnecki
On Fri, 4 Oct 2019 15:42:35 -0700 Kurtis Rader wrote: > > On Fri, Oct 4, 2019 at 3:15 PM T L wrote: > > [...] > Please, drop it. You don't know what you're talking about. I've been amazed > at how patient everyone has been. We need this kind of discussions and arguments. It prepares us to deal

Re: [go-nuts] Channels may not be the best solution in Go

2019-10-05 Thread Rob Pike
> > > Not all programs benefit from concurrency. Writing concurrent code for > essentially sequential programs will not benefit from multiple cores, > like generating prime numbers. Do not forget that concurrency includes > overhead for context switch and memory barriers. Using channels in a >