Every call of xrand calls .Int() on a fresh generator initialised
the same way as the previous one, so it will give the same
result. The calls to .Int() in main are all on the /same/
generator, which is updated by each call, so you get
three different values.
Chris
On 8 May 2017 at 11:26, wr
On 6 April 2017 at 12:00, Ain wrote:
> ie there are some headers and then base64 encoded data. I suspect there
> might be some functions in the std lib which should be able to parse this
> and give me easy access to the headers and data but I just can't find it...
> it isn't mime/multipart, righ
On 11 January 2017 at 09:21, Henry wrote:
> My understanding is that a slice is an array of pointers.
No.
A []T (slice of Ts) contains the length and capacity of the slice
and a pointer to the backing array of the slice. The backing
array is an array of elements of type T (not /pointer/ to T).
If functions are comparable you have to be very
careful in defining /when/ they are equal.
func f(x int)int {return x+2}
func g(x int)int {return x+2}
func h(x int)int {return x+1+1}
Are f and g equal? f and h?
func k() func (int)int { return func(int x)int {x + 1}}
Are k() and k() equal? f and
On 12 November 2016 at 07:33, imd3c wrote:
> package main
>
> import (
> "fmt"
> )
>
> func main() {
> /*
> s := "*/"
> */
>
> fmt.Println("Hello, playground")
> }
And asked if this:
>
> tmp/sandbox035254559/main.go:9: newline in string
> tmp/sandbox035254559/main.go:10: syntax error: unexpe
Your assignments in the deferred function are to the local
variable `err`, not the return value of `Execute` -- you can't
change the return value in the deferred function unless it
has a name.
You want to write
func Execute() (err error) {
defer func() {
...
Now the return value is n
On 4 October 2016 at 07:32, David Luu wrote:
> Say I wanted to define a struct like this:
>
> type runKeywordReturnType struct{
> return interface{}
> status string
> output string
> error string
> traceback string
> }
>
> Seems to not work since return and error are go keywords. If I ca
On 3 October 2016 at 10:16, Marcin Jurczuk wrote:
> Hi,
>
> I hit some issue with son.Marshal string parsing and I don't know is it
> package error or "this is not a bug - it's a feature".
>
> Here is code that doesn't work like expected:
> https://play.golang.org/p/vAOhLCtoSh
>
>
> Why I'm gettin
On 28 July 2016 at 09:04, Carl Ranson wrote:
> I've seen some code that suggests that chan interface{} is a valid.
> what can you send on that?
Anything.
The receiver has to know what to do with it,
of course.
Chris
--
Chris "allusive" Dollin
--
You received this message because you are su