Makes an empty prepared query list an empty slice, not a nil one.

This commit is contained in:
James Phillips 2015-11-11 22:34:10 -08:00
parent 3029906254
commit 0c02365bf2

View file

@ -243,7 +243,7 @@ func (s *StateStore) PreparedQueryList() (uint64, structs.PreparedQueries, error
}
// Go over all of the queries and build the response.
var result structs.PreparedQueries
result := make(structs.PreparedQueries, 0)
for query := queries.Next(); query != nil; query = queries.Next() {
result = append(result, query.(*structs.PreparedQuery))
}