Hello and welcome to Go!
It will all make sense after reading this:
https://blog.golang.org/go-slices-usage-and-internals
I leave you to find the solution once you have read the article :).
Hint:
It indeed has to do with the backing array of the slice.
In step1 you are creating a new slice for d
Hello Group,
I'm very new to GoLang and this is my first post to the group so first of
all hello all :)
I just came across a strange thing which I'm failing to understand:
https://play.golang.org/p/BOCsJqIw63
I don't understand why in Step2, the src slice is changed to [1 2 3 4 1 6 7
8]
I su
Hi,
I am wondering from best practice point of view whether it is better to use
interface or first-class function, especially considering that Go encourages
the use of small interfaces. Here is an example:
type SomethingDoer interface{
DoSomething(data Data)
}
func PerformWork(doer Somethin
https://github.com/golang/go/issues/17985
--
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.
For more options, visit https:
On Sunday, 20 November 2016 05:09:41 UTC+11, Tamás Gulácsi wrote:
>
> Dear Gophers!
>
> I'm trying to make gopkg.in/rana/ora.v3 race-free.
>
> It has a deep hierarchy: Rset->Stmt->Ses->Srv->Env. For some config
> (logger, default column types...) rset has its own copy, but maybe that's
> nil,
I'm not sure what I'm doing wrong or if I understood at all the plugin
package of 1.8
I have a plugin like the example exampleplugin/main.go (build with "go
build -buildmode=plugin")
package main
// // No C code needed.
import "C"
import "fmt"
var V int
func F() { fmt.Printf("Hello, numbe
I've added support for gometalinter. Please take a look at the example in
the godoc[1].
Thanks!
Sridhar
[1] https://godoc.org/github.com/surullabs/lint/gometalinter
On Tuesday, November 15, 2016 at 10:41:40 AM UTC+1, sri...@laddoo.net wrote:
>
> Thanks for the feedback!
>
> Using metalinter see
Thanks for sharing the raw results.
On Thu, Nov 3, 2016 at 10:11 AM, Matt Farina wrote:
> A couple months ago we had a package management survey. Since the survey
> closed the data has been fed into the package management committee.
>
> Now we are sharing the data, that was not asked to be kept
Dear Gophers!
I'm trying to make gopkg.in/rana/ora.v3 race-free.
It has a deep hierarchy: Rset->Stmt->Ses->Srv->Env. For some config
(logger, default column types...) rset has its own copy, but maybe that's
nil, so it has to go to the default, which may be in any of its ancestors...
Just to ma
On Sat, Nov 19, 2016 at 11:33 AM, Vasily Korytov
wrote:
> It stays there for days, so I'm not sure. And the client is supposed to be
> created and destroyed in a function that terminates, so I'm really
> surprised by that.
>
>
The connection can stay there for as long as the server and client wan
On Saturday, November 19, 2016 at 6:21:49 PM UTC+2, James Bardin wrote:
>
>
> Chances are that you're getting better reuse of the client connections. If
> you want to ensure that you reconnect periodically use Request.Close when
> you don't want the connection maintained, or call
> Transport.C
Chances are that you're getting better reuse of the client connections. If
you want to ensure that you reconnect periodically use Request.Close when
you don't want the connection maintained, or call
Transport.CloseIdleConnections occasionally between requests to force the
connections to close.
The easiest way is to use struct embedding so that your UnixTime can
use the time.Time methods:
https://play.golang.org/p/WltVTKxylT
On Sat, Nov 19, 2016 at 12:32 AM, Sathish VJ wrote:
> That by itself works, but I still haven't figured out how to make a custom
> marshal type work automatically i
https://github.com/gen2brain/url2img
Uses QtWebKit for rendering. Binaries that are available for downloads are
compiled with https://github.com/annulen/webkit , but it should also work
with old community builds of webkit.
--
You received this message because you are subscribed to the Google G
P.S. I would like to line out things that changed since the SSL certificate
check was working:
1. Newer Go runtime
2. HTTP/2 connection
3. I used http.Get(url) before and now I use http.Client.Do (I use this for
customizing the User-Agent header)
All the other things did not change, so the chan
Hi,
I've got code like:
client := &http.Client{}
req, _ := http.NewRequest("GET", "https://localhost";, nil)
resp, err := client.Do(req)
I believe that prior to Golang 1.6 or something like this this bailed out
with err when the SSL certificate is not valid (expired or other things).
That is:
That by itself works, but I still haven't figured out how to make a custom
marshal type work automatically in both directions. i.e. the streaming part
in json is in unix time format but internally it is time.Time.
Can we put a custom type in the tag value? Something like this?
T time.Time `jso
17 matches
Mail list logo