package d2lib
Import Path
oss.terrastruct.com/d2/d2lib (on go.dev )
Dependency Relation
imports 18 packages , and imported by one package
Involved Source Files
d2.go
Package-Level Type Names (only one)
/* sort by: alphabet | popularity */
type CompileOptions (struct)
Fields (total 9 )
FS fs .FS
FontFamily *d2fonts .FontFamily
FontFamily controls the font family used for all texts that are not the following:
- code
- latex
- pre-measured (web setting)
TODO maybe some will want to configure code font too, but that's much lower priority
InputPath string
Layout *string
LayoutResolver func(engine string ) (d2graph .LayoutGraph , error )
MeasuredTexts []*d2target .MText
RouterResolver func(engine string ) (d2graph .RouteEdges , error )
Ruler *textmeasure .Ruler
UTF16Pos bool
As Inputs Of (at least 2 )
func Compile (ctx context .Context , input string , compileOpts *CompileOptions , renderOpts *d2svg .RenderOpts ) (*d2target .Diagram , *d2graph .Graph , error )
func Parse (ctx context .Context , input string , compileOpts *CompileOptions ) (*d2ast .Map , error )
Package-Level Functions (total 2)
The pages are generated with Golds v0.8.2 . (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 .