package elk
Import Path
github.com/d2lang/elk-go (on go.dev)
Dependency Relation
imports 7 packages, and imported by one package
Involved Source Files
Package elk provides a native Go implementation of the Eclipse Layout
Kernel JSON behavior used by D2, pinned to official ELK.js 0.12.0. It does
not promise compatibility with expert option combinations outside D2's
documented profile.
layout.go
Package-Level Type Names (total 9)
Edge is an ELK JSON edge.
EdgeSection is a routed section of an ELK JSON edge.
Graph is the root ELK JSON graph type.
ID is a string- or integer-valued ELK graph identifier.
Label is an ELK JSON label.
LayoutOptions maps ELK option identifiers to their JSON values.
Node is an ELK JSON node.
Point is an ELK JSON bend or junction point.
Port is an ELK JSON port.
Package-Level Functions (total 8)
Float64 returns a pointer suitable for optional numeric graph fields.
IDPtr returns a pointer to a copy of id.
IntID constructs an integer-valued graph identifier.
Layout computes layout in place. Like elkjs, it preserves the input graph's
element and slice order and adds computed shape and edge-route fields.
LayoutJSON is the byte-oriented equivalent of Layout.
Number returns value, or zero when value is nil.
String returns a pointer suitable for optional text fields.
StringID constructs a string-valued graph identifier.
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |