@@ -273,16 +273,16 @@ func printGraphBySource(graph *api_schema.GraphResponse) {
273273 for i , e := range graph .HTTPEdges {
274274 // TODO: this assumes service is the only supported source vertex, which is true right now.
275275 if i > 0 && e .SourceAttributes != graph .HTTPEdges [i - 1 ].SourceAttributes {
276- fmt .Printf ("\n %-30s -> " , hostOrUnknown (e .SourceAttributes .Host ))
276+ fmt .Printf ("\n %-30s -> " , hostOrUnknown (e .SourceAttributes .Host . String () ))
277277 } else if i == 0 {
278- fmt .Printf ("%-30s -> " , hostOrUnknown (e .SourceAttributes .Host ))
278+ fmt .Printf ("%-30s -> " , hostOrUnknown (e .SourceAttributes .Host . String () ))
279279 } else {
280280 // Don't repeat source information
281281 fmt .Printf ("%-30s -> " , "" )
282282 }
283283
284284 if e .TargetAttributes .PathTemplate == "" {
285- fmt .Printf ("%-30s\n " , hostOrUnknown (e .TargetAttributes .Host ))
285+ fmt .Printf ("%-30s\n " , hostOrUnknown (e .TargetAttributes .Host . String () ))
286286 } else {
287287 fmt .Printf ("%-30s %7s %s\n " , e .TargetAttributes .Host , e .TargetAttributes .Method , e .TargetAttributes .PathTemplate )
288288 }
@@ -375,11 +375,11 @@ func printGraphByTarget(graph *api_schema.GraphResponse) {
375375 }
376376
377377 // TODO: this assumes service is the only supported source vertex, which is true right now.
378- fmt .Printf ("%-30s -> " , hostOrUnknown (e .SourceAttributes .Host ))
378+ fmt .Printf ("%-30s -> " , hostOrUnknown (e .SourceAttributes .Host . String () ))
379379
380380 if (i > 0 && e .TargetAttributes != graph .HTTPEdges [i - 1 ].TargetAttributes ) || i == 0 {
381381 if e .TargetAttributes .PathTemplate == "" {
382- fmt .Printf ("%-30s\n " , hostOrUnknown (e .TargetAttributes .Host ))
382+ fmt .Printf ("%-30s\n " , hostOrUnknown (e .TargetAttributes .Host . String () ))
383383 } else {
384384 fmt .Printf ("%-30s %7s %s\n " , e .TargetAttributes .Host , e .TargetAttributes .Method , e .TargetAttributes .PathTemplate )
385385 }
@@ -433,12 +433,12 @@ func printDot(graph *api_schema.GraphResponse) {
433433 for _ , e := range graph .HTTPEdges {
434434 if e .TargetAttributes .PathTemplate == "" {
435435 fmt .Printf (" %q -> %q [label=\" %v\" ]\n " ,
436- hostOrUnknown (e .SourceAttributes .Host ),
436+ hostOrUnknown (e .SourceAttributes .Host . String () ),
437437 e .TargetAttributes .Host ,
438438 e .Values [api_schema .Event_Count ])
439439 } else {
440440 fmt .Printf (" %q -> \" %s\\ n%s %s\" [label=\" %v\" ]\n " ,
441- hostOrUnknown (e .SourceAttributes .Host ),
441+ hostOrUnknown (e .SourceAttributes .Host . String () ),
442442 e .TargetAttributes .Host ,
443443 e .TargetAttributes .Method ,
444444 e .TargetAttributes .PathTemplate ,
0 commit comments