I think so.  Unless you have an idea of how long it should be, in which
case you can use make([]T, <length>, <capacity>).


On Fri, Apr 19, 2013 at 2:29 PM, Matthew McFarland <notifications@github.com
> wrote:

> In server.go:
>
> > @@ -52,7 +59,9 @@ func JsonServer(ws *websocket.Conn, db *sql.DB) {
> >  			return
> >  		}
> >
> > -		results := []Address{}
> > +		// One of the cool things about Go is that nil usually behaves like empty.
> > +		// so append works fine if results is nil.
> > +		var results []Address
>
> Cool. Is this the right idiom, to make T[] of unknown length and append
> into it after scanning my Rows?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/mmcfarland/address-autocomplete/pull/1/files#r3879061>
> .
>