Help us shape the future of Go! Take the 2026 Go Developer Survey

support

package
v0.0.16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DiagramBuilder

type DiagramBuilder struct {
	// contains filtered or unexported fields
}

DiagramBuilder provides a fluent API for creating test diagrams.

func NewDiagram

func NewDiagram() *DiagramBuilder

NewDiagram creates a new diagram builder with defaults.

func (*DiagramBuilder) AddEdge

func (b *DiagramBuilder) AddEdge(from, to string) *DiagramBuilder

AddEdge adds an edge to the diagram.

func (*DiagramBuilder) AddNode

func (b *DiagramBuilder) AddNode(id, contents string) *DiagramBuilder

AddNode adds a node to the diagram.

func (*DiagramBuilder) AddNodeWithDimensions

func (b *DiagramBuilder) AddNodeWithDimensions(id, contents string, width, height int) *DiagramBuilder

AddNodeWithDimensions adds a node with specified dimensions.

func (*DiagramBuilder) Build

func (b *DiagramBuilder) Build() *domain.Diagram

Build returns the constructed diagram.

func (*DiagramBuilder) WithBorder

func (b *DiagramBuilder) WithBorder(border int) *DiagramBuilder

WithBorder sets the diagram border.

func (*DiagramBuilder) WithLayout

func (b *DiagramBuilder) WithLayout(layout domain.LayoutType) *DiagramBuilder

WithLayout sets the layout type.

func (*DiagramBuilder) WithMargin

func (b *DiagramBuilder) WithMargin(margin int) *DiagramBuilder

WithMargin sets the diagram margin.

func (*DiagramBuilder) WithNodeHeight

func (b *DiagramBuilder) WithNodeHeight(h int) *DiagramBuilder

WithNodeHeight sets the diagram node height.

func (*DiagramBuilder) WithNodeWidth

func (b *DiagramBuilder) WithNodeWidth(w int) *DiagramBuilder

WithNodeWidth sets the diagram node width.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL