Versions in this module Expand all Collapse all v1 v1.152.6 Nov 2, 2026 Changes in this version + const MaxSVGBytes + const MaxSourceBytes + const Timeout + var ErrTimeout = errors.New("d2render: the diagram did not finish rendering in time") + var ErrTooLarge = errors.New("d2render: the diagram is too large to render") + func Render(ctx context.Context, src string, dark bool) ([]byte, error) + func Serve(w http.ResponseWriter, r *http.Request, name, contentType string, ...) bool