Aller tranche de tableau à partir de la fonction de l'instruction return

J'ai les fonctions suivantes:

func (c *Class)A()[4]byte
func B(x []byte)

Je veux l'appeler

B(c.A()[:])

mais j'obtiens cette erreur:

cannot take the address of c.(*Class).A()

Comment obtenir une tranche d'un tableau retourné par une fonction en Aller?

InformationsquelleAutor ThePiachu | 2011-11-29