fix again
This commit is contained in:
parent
2340b47a31
commit
3ee4eb5928
4 changed files with 8 additions and 6 deletions
|
|
@ -3,3 +3,5 @@
|
|||
#### Improvements 🧹
|
||||
|
||||
#### Bugfixes ⛑️
|
||||
|
||||
- Fix executable plugins that implement standalone router [#1910](https://github.com/terrastruct/d2/pull/1910)
|
||||
|
|
|
|||
|
|
@ -223,8 +223,8 @@ func (p *execPlugin) RouteEdges(ctx context.Context, g *d2graph.Graph, edges []*
|
|||
}
|
||||
|
||||
in := routeEdgesInput{
|
||||
g: graphBytes,
|
||||
gedges: graphBytes2,
|
||||
G: graphBytes,
|
||||
GEdges: graphBytes2,
|
||||
}
|
||||
|
||||
b, err := json.Marshal(in)
|
||||
|
|
|
|||
|
|
@ -86,8 +86,8 @@ type RoutingPlugin interface {
|
|||
}
|
||||
|
||||
type routeEdgesInput struct {
|
||||
g []byte
|
||||
gedges []byte
|
||||
G []byte `json:"g"`
|
||||
GEdges []byte `json:"gEdges"`
|
||||
}
|
||||
|
||||
// PluginInfo is the current info information of a plugin.
|
||||
|
|
|
|||
|
|
@ -157,12 +157,12 @@ func routeEdges(ctx context.Context, p RoutingPlugin, ms *xmain.State) error {
|
|||
}
|
||||
|
||||
var g d2graph.Graph
|
||||
if err := d2graph.DeserializeGraph(in.g, &g); err != nil {
|
||||
if err := d2graph.DeserializeGraph(in.G, &g); err != nil {
|
||||
return fmt.Errorf("failed to unmarshal input graph to graph: %s", in)
|
||||
}
|
||||
|
||||
var gedges d2graph.Graph
|
||||
if err := d2graph.DeserializeGraph(in.gedges, &gedges); err != nil {
|
||||
if err := d2graph.DeserializeGraph(in.GEdges, &gedges); err != nil {
|
||||
return fmt.Errorf("failed to unmarshal input edges graph to graph: %s", in)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue