Skip to content

Commit

Permalink
chore: print to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Musat authored and gabotechs committed Dec 24, 2022
1 parent 59aa121 commit 69364d3
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"errors"
"fmt"
"strings"

"dep-tree/internal/graph"
Expand Down Expand Up @@ -36,14 +37,10 @@ var Root = &cobra.Command{

if endsWith(entrypoint, js.Extensions) {
content, err := graph.RenderGraph(entrypoint, js.Parser)
print(content)
if err != nil {
return err
}
fmt.Print(content)
return err
} else {
return errors.New("file not supported")
}

return nil
},
}

0 comments on commit 69364d3

Please sign in to comment.