[go-nuts] Go can't alloc custom objects from byte slice's memory address?

2016-07-08 Thread Tamás Gulácsi
That unsafe conversions should work, but it is unsafe. That panic means your byte accounting is wrong somewhere. -- 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] log.Logger, Why is this not an interface?

2016-07-08 Thread Peter Mogensen
On 2016-07-08 20:28, Konstantin Khomoutov wrote: I think I understand your concerns, and actually has nothing to say against them. The only possible (and very real) case is that easy to use full-blown logging tends to be abused in some circles, namely, in the Java world where every freaking

Re: [go-nuts] Re: golang sql driver: bad connection

2016-07-08 Thread Raj
On Friday, July 8, 2016 at 11:16:50 PM UTC+5:30, Konstantin Khomoutov wrote: > > On Fri, 8 Jul 2016 08:15:27 -0700 (PDT) > Raj wrote: > > > Initially the program giving err driver: bad connection for rows.Err > > (). So I added panic with that error to get the stack

Re: [go-nuts] log.Logger, Why is this not an interface?

2016-07-08 Thread Konstantin Khomoutov
On Fri, 8 Jul 2016 20:05:13 +0200 Peter Mogensen wrote: [...] > > As soon as _advanced_ logging is required, you do several things: > > 1) Reconsider approach to logging. > > 2) Use a full-blown logging library. > > > > Note that (1) should not be underestimated. What is OK for a

Re: [go-nuts] log.Logger, Why is this not an interface?

2016-07-08 Thread Zachary Gershman
What's funny is, I am taking this exact approach and going backwards. We had structured logging in the library I have and it is actually too much info for the end user that would be looking at it. This library is fairly decent in size. On Friday, July 8, 2016 at 11:05:50 AM UTC-7, Peter

Re: [go-nuts] log.Logger, Why is this not an interface?

2016-07-08 Thread Peter Mogensen
On 2016-07-08 19:56, Konstantin Khomoutov wrote: On Fri, 8 Jul 2016 19:14:27 +0200 Peter Mogensen wrote: The standard log library doesn't support logging simple "message". At least not in an efficient way. But that's precisely what Zachary is advocating (and I'm with him on

Re: [go-nuts] log.Logger, Why is this not an interface?

2016-07-08 Thread Konstantin Khomoutov
On Fri, 8 Jul 2016 19:14:27 +0200 Peter Mogensen wrote: > > I disagree - if you have no need for structured logging, why reach > > for a library? Stdlib seems to work just fine until you run into a > > large amount of log output that is mission critical or you want to > > start

[go-nuts] [ANN] go-resty v0.8 release - simple HTTP and REST client library

2016-07-08 Thread Jeevanandam M.
go-resty: https://github.com/go-resty/resty godoc : https://godoc.org/github.com/go-resty/resty This release brings following enhancements: - Added method `SetMultiValueQueryParams` for multi value query params #28 - Added method `SetScheme` for non-http scheme option PR #30 -

Re: [go-nuts] log.Logger, Why is this not an interface?

2016-07-08 Thread Peter Mogensen
On 2016-07-08 18:34, Zachary Gershman wrote: I disagree - if you have no need for structured logging, why reach for a library? Stdlib seems to work just fine until you run into a large amount of log output that is mission critical or you want to start shipping these logs off to a third party

Re: [go-nuts] log.Logger, Why is this not an interface?

2016-07-08 Thread Zachary Gershman
I disagree - if you have no need for structured logging, why reach for a library? Stdlib seems to work just fine until you run into a large amount of log output that is mission critical or you want to start shipping these logs off to a third party for parsing (like data-dog). Other than that,

[go-nuts] Re: log.Logger, Why is this not an interface?

2016-07-08 Thread Chad
It's funny because I have been thinking about logging lately. And I believe that the data/message, with a chosen formatting, is more important here. A mere function with an interface argument could even be sufficient. On Friday, July 8, 2016 at 6:33:37 AM UTC+2, Zachary Gershman wrote: > > Hey

Re: [go-nuts] Re: golang sql driver: bad connection

2016-07-08 Thread Raj
Hi Ian, Initially the program giving err driver: bad connection for rows.Err(). So I added panic with that error to get the stack trace. for rows.Next() { //stats calculation } if err := rows.Err(); err != nil { panic(err) *// this is line 498* } rows.Close() How can find out the

Re: [go-nuts] log.Logger, Why is this not an interface?

2016-07-08 Thread zgershman
So, if in the foreseeable future I am not going to swap my logging implementation (won't say never) then it would seem to me that I don't need to prematurely use an interface when one is not required. Does that sound correct? On Friday, July 8, 2016 at 5:51:18 AM UTC-7, Ian Davis wrote: >

Re: [go-nuts] log.Logger, Why is this not an interface?

2016-07-08 Thread Viktor Kojouharov
It would have been quite useful for the stdlib to define a logger interface, so that third party loggers would implement it and allow for easier switching between them On Friday, July 8, 2016 at 11:34:01 AM UTC+3, Ian Davis wrote: > > On Fri, Jul 8, 2016, at 05:29 AM, zger...@pivotal.io wrote:

[go-nuts] Golang serial port get CTS and DSR values

2016-07-08 Thread hchameera
Hi, I just want to know, how to get CTS and DSR values in windows environment. i have tried below way, but it did not work for me; Can u please look into this? func (p *Port) getCtrlSignal(sigmask uint) (bool, error) { state := uint(0) _, _, errno := syscall.Syscall(

[go-nuts] How to use server-push in net/http?

2016-07-08 Thread lingfoozon
How to access http/2 connections and send data to client from server? Thanks -- 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

[go-nuts] Re: Go 1.7 Release Candidate 1 is released

2016-07-08 Thread Val
Great menu, thanks. In the Release Notes DRAFT, "IsExist*s*" should be fixed to "IsExist", both in text and link. Cheers On Friday, July 8, 2016 at 6:50:34 AM UTC+2, Chris Broadfoot wrote: > > Hello gophers, > > We have just released go1.7rc1, a release candidate for Go 1.7. > It is cut from

[go-nuts] Re: Go 1.7 Release Candidate 1 is released

2016-07-08 Thread Ondrej
Excellent work! - Binary 27% smaller - Performance up by 5-10% - JSON marshalling of numerical keys much welcome - Fortran support is great (I haven't tested it, but just the prospects are cool) Thank you, as always. On Friday, 8 July 2016 05:50:34 UTC+1, Chris Broadfoot wrote: > > Hello

[go-nuts] Re: Go 1.7 Release Candidate 1 is released

2016-07-08 Thread Lucio
This may be spurious, but I took a fresh clone/checkout of go1.7rc1 and tried to build it using an arbitrary TIP (at the time) version of Go - one, I'm sure, that was running on NetBSD before - and came up with odd errors. It just happened to be the platform at hand at the time. I have just

Re: [go-nuts] log.Logger, Why is this not an interface?

2016-07-08 Thread Ian Davis
On Fri, Jul 8, 2016, at 05:29 AM, zgersh...@pivotal.io wrote: > Hey All, > > Originally asked on twitter but a more long-form medium is required to > answer this question. I've recently been working on adding logging to > a library and have been replacing what was once a custom logging > interface

[go-nuts] Re: log.Logger, Why is this not an interface?

2016-07-08 Thread Egon
On Friday, 8 July 2016 07:33:37 UTC+3, zger...@pivotal.io wrote: > > Hey All, > > Originally asked on twitter but a more long-form medium is required to > answer this question. I've recently been working on adding logging to a > library and have been replacing what was once a custom logging