I have the following functions:
func (c *Class)A()[4]byte func B(x []byte)
I want to call
B(c.A()[:])
but I get this error:
cannot take the address of c.(*Class).A()
How do I properly get a slice of an array returned by a function in Go?
Have you tried sticking the array in a local variable first?
ary := c.A() B(ary[:])