@@ -22,11 +22,11 @@ import (
2222 "text/template"
2323
2424 "github.com/Masterminds/sprig/v3"
25+ "github.com/score-spec/score-go/formatter"
2526 "github.com/score-spec/score-go/framework"
2627 "github.com/spf13/cobra"
2728
2829 "github.com/score-spec/score-compose/internal/project"
29- "github.com/score-spec/score-compose/internal/util"
3030)
3131
3232const (
@@ -122,12 +122,12 @@ func getResourceOutputsKeys(uid framework.ResourceUid, state *project.State) ([]
122122
123123func displayResourcesOutputs (outputs map [string ]interface {}, cmd * cobra.Command ) error {
124124 outputFormat := cmd .Flags ().Lookup (getOutputsCmdFormatFlag ).Value .String ()
125- var outputFormatter util .OutputFormatter
125+ var outputFormatter formatter .OutputFormatter
126126 switch outputFormat {
127127 case "json" :
128- outputFormatter = & util .JSONOutputFormatter [map [string ]interface {}]{Data : outputs , Out : cmd .OutOrStdout ()}
128+ outputFormatter = & formatter .JSONOutputFormatter [map [string ]interface {}]{Data : outputs , Out : cmd .OutOrStdout ()}
129129 case "yaml" :
130- outputFormatter = & util .YAMLOutputFormatter [map [string ]interface {}]{Data : outputs , Out : cmd .OutOrStdout ()}
130+ outputFormatter = & formatter .YAMLOutputFormatter [map [string ]interface {}]{Data : outputs , Out : cmd .OutOrStdout ()}
131131 default :
132132 // ensure there is a new line at the end if one is not already present
133133 if ! strings .HasSuffix (outputFormat , "\n " ) {
@@ -148,7 +148,7 @@ func displayResourcesOutputs(outputs map[string]interface{}, cmd *cobra.Command)
148148
149149func displayResourcesList (resources []framework.ResourceUid , state project.State , cmd * cobra.Command ) error {
150150 outputFormat := cmd .Flag ("format" ).Value .String ()
151- var outputFormatter util .OutputFormatter
151+ var outputFormatter formatter .OutputFormatter
152152
153153 switch outputFormat {
154154 case "json" :
@@ -168,7 +168,7 @@ func displayResourcesList(resources []framework.ResourceUid, state project.State
168168 Outputs : keys ,
169169 })
170170 }
171- outputFormatter = & util .JSONOutputFormatter [[]jsonData ]{Data : outputs , Out : cmd .OutOrStdout ()}
171+ outputFormatter = & formatter .JSONOutputFormatter [[]jsonData ]{Data : outputs , Out : cmd .OutOrStdout ()}
172172 default :
173173 var rows [][]string
174174 for _ , resource := range resources {
@@ -179,7 +179,7 @@ func displayResourcesList(resources []framework.ResourceUid, state project.State
179179 row := []string {string (resource ), strings .Join (keys , ", " )}
180180 rows = append (rows , row )
181181 }
182- outputFormatter = & util .TableOutputFormatter {
182+ outputFormatter = & formatter .TableOutputFormatter {
183183 Headers : []string {"UID" , "Outputs" },
184184 Rows : rows ,
185185 Out : cmd .OutOrStdout (),
0 commit comments