@@ -86,7 +86,7 @@ func getProbeList(projectID string, cmd *cobra.Command, credentials types.Creden
8686 }
8787 _ , option , err := prompt .Run ()
8888 if err != nil {
89- fmt . Printf ("Prompt failed %v \n " , err )
89+ utils . PrintFormattedError ("Prompt failed" , err )
9090 return
9191 }
9292 fmt .Printf ("You chose %q\n " , option )
@@ -106,7 +106,7 @@ func getProbeList(projectID string, cmd *cobra.Command, credentials types.Creden
106106
107107 selectedIndex , result , err := prompt .Run ()
108108 if err != nil {
109- fmt . Printf ("Prompt failed %v \n " , err )
109+ utils . PrintFormattedError ("Prompt failed" , err )
110110 os .Exit (1 )
111111 }
112112
@@ -156,7 +156,7 @@ func getProbeList(projectID string, cmd *cobra.Command, credentials types.Creden
156156 for _ , probe := range probes_data [start :end ] {
157157 intTime , err := strconv .ParseInt (probe .CreatedAt , 10 , 64 )
158158 if err != nil {
159- fmt . Println ("Error converting CreatedAt to int64: " , err )
159+ utils . PrintFormattedError ("Error converting CreatedAt to int64" , err )
160160 continue
161161 }
162162 humanTime := time .Unix (intTime , 0 )
@@ -201,12 +201,12 @@ func getProbeDetails(projectID, ProbeID string, credentials types.Credentials) {
201201 writer := tabwriter .NewWriter (os .Stdout , 30 , 8 , 2 , '\t' , tabwriter .AlignRight )
202202 intUpdateTime , err := strconv .ParseInt (probeGetData .UpdatedAt , 10 , 64 )
203203 if err != nil {
204- utils .Red . Println ("Error converting UpdatedAt to int64: " , err )
204+ utils .PrintFormattedError ("Error converting UpdatedAt to int64" , err )
205205 }
206206 updatedTime := time .Unix (intUpdateTime , 0 ).String ()
207207 intCreatedTime , err := strconv .ParseInt (probeGetData .CreatedAt , 10 , 64 )
208208 if err != nil {
209- utils .Red . Println ("Error converting CreatedAt to int64: " , err )
209+ utils .PrintFormattedError ("Error converting CreatedAt to int64" , err )
210210 }
211211 createdTime := time .Unix (intCreatedTime , 0 ).String ()
212212 utils .White_B .Fprintln (writer , "PROBE DETAILS" )
0 commit comments