summaryrefslogtreecommitdiffstats
path: root/cmd/npd.go
diff options
context:
space:
mode:
authors <[email protected]>2025-11-13 14:43:15 -0500
committers <[email protected]>2025-11-13 14:43:15 -0500
commit344a6f6415c3c1b593677adec3b8844e0839971b (patch)
treeb05291ecdf21917b27e9e234eeb997c2706966d5 /cmd/npd.go
parenta5fc01a03753c9a18ddeaf13610dd99b4b311b80 (diff)
downloaddborg-344a6f6415c3c1b593677adec3b8844e0839971b.tar.gz
dborg-344a6f6415c3c1b593677adec3b8844e0839971b.zip
created pretty printing for all commandsv1.0.0
Diffstat (limited to 'cmd/npd.go')
-rw-r--r--cmd/npd.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/cmd/npd.go b/cmd/npd.go
index 9868eae..c8b0b28 100644
--- a/cmd/npd.go
+++ b/cmd/npd.go
@@ -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
}