Fix null result in output

This commit is contained in:
Peter Stuifzand 2018-12-09 16:26:44 +01:00
parent 886a83e3e8
commit d997fa8ca9
Signed by: peter
GPG Key ID: 374322D56E5209E8

View File

@ -475,7 +475,8 @@ func getPossibleURLs(query string) []string {
func (b *memoryBackend) Search(query string) ([]microsub.Feed, error) {
urls := getPossibleURLs(query)
var feeds []microsub.Feed
// needs to be like this, because we get a null result otherwise in the json output
feeds := []microsub.Feed{}
for _, u := range urls {
log.Println(u)