Original post

I’ve an array as:

// Stock file
type Stock []StockLine

And want to get the length of this array as:

//Records returns number of records in the stock file
func (s *Stock) Records() int {
	return len(*s)
}

But the returned output looks to be address instead of the length, i got:

0x1154420

How can I return the proper length?