File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -67,26 +67,26 @@ func runSearchCommand(cmd *cobra.Command, args []string) {
67
67
// output from this command requires special formatting so we create a dedicated
68
68
// feedback.Result implementation
69
69
type searchResults struct {
70
- boards []* fResult.BoardListItem
70
+ Boards []* fResult.BoardListItem `json:"boards"`
71
71
}
72
72
73
73
func (r searchResults ) Data () interface {} {
74
- return r . boards
74
+ return r
75
75
}
76
76
77
77
func (r searchResults ) String () string {
78
- if len (r .boards ) == 0 {
78
+ if len (r .Boards ) == 0 {
79
79
return ""
80
80
}
81
81
82
82
t := table .New ()
83
83
t .SetHeader (tr ("Board Name" ), tr ("FQBN" ), tr ("Platform ID" ), "" )
84
84
85
- sort .Slice (r .boards , func (i , j int ) bool {
86
- return r .boards [i ].Name < r .boards [j ].Name
85
+ sort .Slice (r .Boards , func (i , j int ) bool {
86
+ return r .Boards [i ].Name < r .Boards [j ].Name
87
87
})
88
88
89
- for _ , item := range r .boards {
89
+ for _ , item := range r .Boards {
90
90
hidden := ""
91
91
if item .IsHidden {
92
92
hidden = tr ("(hidden)" )
You can’t perform that action at this time.
0 commit comments