Skip to content

Commit

Permalink
fix(search): change type from interface to dataset so rpc can seriali…
Browse files Browse the repository at this point in the history
…ze (#1226)
  • Loading branch information
Arqu authored Mar 30, 2020
1 parent 842aef5 commit ebadaec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions cmd/stringers.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (

"github.com/dustin/go-humanize"
"github.com/fatih/color"
"github.com/qri-io/dataset"
"github.com/qri-io/qri/config"
"github.com/qri-io/qri/dsref"
"github.com/qri-io/qri/lib"
Expand Down Expand Up @@ -159,7 +158,7 @@ func (r searchResultStringer) String() string {
w := &strings.Builder{}
title := color.New(color.FgGreen, color.Bold).SprintFunc()
path := color.New(color.Faint).SprintFunc()
ds := r.Value.(*dataset.Dataset)
ds := r.Value

fmt.Fprintf(w, "%s/%s", title(ds.Peername), title(ds.Name))
fmt.Fprintf(w, "\n%s", r.URL)
Expand Down
3 changes: 2 additions & 1 deletion lib/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package lib
import (
"fmt"

"github.com/qri-io/dataset"
"github.com/qri-io/qri/registry/regclient"
"github.com/qri-io/qri/repo"
)
Expand Down Expand Up @@ -32,7 +33,7 @@ type SearchParams struct {
type SearchResult struct {
Type, ID string
URL string
Value interface{}
Value *dataset.Dataset
}

// Search queries for items on qri related to given parameters
Expand Down

0 comments on commit ebadaec

Please sign in to comment.