@@ -62,12 +62,12 @@ func (f *D2LangFormatter) Format(td *TemplateData, templateContent string) (err
62
62
portID := fmt .Sprintf ("%s-port%d" , hostID , port .PortID )
63
63
graph , _ , _ = d2oracle .Create (graph , nil , portID )
64
64
portLabel := fmt .Sprintf ("%d/%s\n %s\n %s" , port .PortID , port .Protocol , port .State .State , port .Service .Name )
65
- graph , _ = d2oracle .Set (graph , nil , portID + " .label" , nil , & portLabel )
65
+ graph , _ = d2oracle .Set (graph , nil , fmt . Sprintf ( "%s .label", portID ) , nil , & portLabel )
66
66
shape := "circle"
67
- graph , _ = d2oracle .Set (graph , nil , portID + " .shape" , nil , & shape )
67
+ graph , _ = d2oracle .Set (graph , nil , fmt . Sprintf ( "%s .shape", portID ) , nil , & shape )
68
68
width := "25"
69
- graph , _ = d2oracle .Set (graph , nil , portID + " .width" , nil , & width )
70
- graph , _ = d2oracle .Move (graph , nil , portID , hostID + ". " + portID , true )
69
+ graph , _ = d2oracle .Set (graph , nil , fmt . Sprintf ( "%s .width", portID ) , nil , & width )
70
+ graph , _ = d2oracle .Set (graph , nil , hostID + " -> " + portID , nil , nil )
71
71
}
72
72
}
73
73
_ , err = f .config .Writer .Write ([]byte (d2format .Format (graph .AST )))
0 commit comments