Makes an empty prepared query list an empty slice, not a nil one.
This commit is contained in:
parent
3029906254
commit
0c02365bf2
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue