diff options
Diffstat (limited to 'cmd/osint.go')
| -rw-r--r-- | cmd/osint.go | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/cmd/osint.go b/cmd/osint.go index 49b94ab..5aa8799 100644 --- a/cmd/osint.go +++ b/cmd/osint.go @@ -6,6 +6,7 @@ import ( "git.db.org.ai/dborg/internal/client" "git.db.org.ai/dborg/internal/config" "git.db.org.ai/dborg/internal/models" + "git.db.org.ai/dborg/internal/utils" "github.com/spf13/cobra" ) @@ -106,13 +107,7 @@ func runOsintBSSIDLookup(cmd *cobra.Command, args []string) error { return err } - output, err := json.MarshalIndent(response, "", " ") - if err != nil { - return fmt.Errorf("failed to format response: %w", err) - } - - fmt.Println(string(output)) - return nil + return utils.PrintJSON(response) } func runOsintBreachForumSearch(cmd *cobra.Command, args []string) error { @@ -134,11 +129,5 @@ func runOsintBreachForumSearch(cmd *cobra.Command, args []string) error { return err } - output, err := json.MarshalIndent(response, "", " ") - if err != nil { - return fmt.Errorf("failed to format response: %w", err) - } - - fmt.Println(string(output)) - return nil + return utils.PrintJSON(response) } |
