[go-nuts] Re: Error running vgo with go1.10.1 on darwin

2018-04-16 Thread jra
You might be hitting the same problem 
as https://github.com/golang/go/issues/24694, which was fixed on April 5. 
Try updating your vgo (go get -u golang.org/x/vgo) and see if you get a 
different result.

The key thing is that vgo needs the GOROOT directory available to look at. 
It looks first in $VGOROOT, and then in $GOROOT, and then in the GOROOT 
compiled into the binary. If you have neither VGOROOT or GOROOT set, and 
the binary was built and then the GOROOT was moved, bad things will happen. 
But with commit 7373d8bcff7c682d097eabe987299681fa40a9cf, the error is more 
understandable.

 -jeff

>
>

-- 
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://groups.google.com/d/optout.


[go-nuts] Re: get the data out of slice of structs

2017-10-26 Thread jra
At this point, variable got is a slice of length 0. If you tried to access 
got[0], you'd get a panic at runtime for out of bounds access.

You could add a State to it like this: got = append(got, State{ 
DLastmodified: time.Now(), DState: "test" }) and then access it with got[0].

You would probably benefit from working your way all the way through the Go 
Tour: https://tour.golang.org/

Welcome and good luck.

 -jeff

On Thursday, October 26, 2017 at 8:30:29 AM UTC+2, Vikram Rawat wrote:
>
> I have created a struct
>
> type State struct{
>  DLastmodified time.Time
>  DState string
> }
>
>
>
> and created a slice of struct like
>
>
> got :=[]State{}
>
>
> Now I am unable to get the column data out of this slice. please help. If you 
> want to read the full code let me know. 
>
> I just wanted to know how to get the data out of it. *Please help.*
>
>
>
>

-- 
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://groups.google.com/d/optout.


[go-nuts] Re: [golang-dev] Subject: Go 1.9.2 and Go 1.8.5 are released

2017-10-26 Thread jra
On Thursday, October 26, 2017 at 4:58:52 AM UTC+2, Michael Hudson-Doyle 
wrote:
>
> I've updated my snaps with both these releases, so users with the snap 
> already installed should get them soon, or snap install --classic --channel 
> 1.9/stable go on an ubuntu or ubuntu-like system if you want to try them 
> out :)
>

Thanks for this. It gave me motivation to go learn about snaps for the 
first time.

 -jeff 

-- 
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://groups.google.com/d/optout.


[go-nuts] Re: A tour of go - Since a couple days ago the line numbers started to render on the right side or the margin line (instead of left).

2017-10-25 Thread jra
I see that as well with Chrome and Firefox.

When I used the instructions 

 
to run a local copy of the tour to debug it, the problem went away.

So it has something to do with how it is run/served from golang.org.

 -jeff

-- 
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://groups.google.com/d/optout.


[go-nuts] go-any: a more generic way to download Go versions

2017-10-25 Thread jra
If anyone is interested, I have made a tiny update to the tool used to 
download and run release candidates which makes it useful for any version 
number:

  
https://github.com/jeffallen/build/commit/dfeb16f0a5edb0c0c2a8278962812ce100f63bff

I find it useful, you might too. If someone from the Go core team asks me 
to, I will submit it as a CL.

  -jeff

-- 
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://groups.google.com/d/optout.