diff options
Diffstat (limited to 'cmd/npd.go')
| -rw-r--r-- | cmd/npd.go | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -2,11 +2,11 @@ package cmd import ( "fmt" + "git.db.org.ai/dborg/internal/client" "git.db.org.ai/dborg/internal/config" + "git.db.org.ai/dborg/internal/formatter" "git.db.org.ai/dborg/internal/models" - "git.db.org.ai/dborg/internal/utils" - "github.com/spf13/cobra" ) @@ -84,5 +84,10 @@ func runNPDSearch(cmd *cobra.Command, args []string) error { return fmt.Errorf("API error: %s", response.Error) } - return utils.PrintJSON(response.Results.Hits) + output, err := formatter.FormatNPDResults(response, IsJSONOutput()) + if err != nil { + return err + } + fmt.Print(output) + return nil } |
