Version: v0.6.7 Latest Latest

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

Go to latest
Published: Jul 9, 2021 License: MIT Imports: 4 Imported by: 0



Package printer has the abstraction logic to print Graph. It's an interface that could have different implementations, one for each type of different Printer



This section is empty.


This section is empty.


func TypeStrings

func TypeStrings() []string

TypeStrings returns a slice of all String values of the enum


type Options added in v0.2.0

type Options struct {
	// ShowIcons toggles display of the
	// icons on the end Graph
	ShowIcons bool

Options is the possible options that the Printer can have

type Printer

type Printer interface {
	Print(g *graph.Graph, opt Options, w io.Writer) error

Printer is an abstraction to Print the graph.Graph in different formats

type Type

type Type int

Type defines the type of the Printer iota

const (
	DOT Type = iota

List of all Types

func TypeString

func TypeString(s string) (Type, error)

TypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func TypeValues

func TypeValues() []Type

TypeValues returns all values of the enum

func (Type) IsAType

func (i Type) IsAType() bool

IsAType returns "true" if the value is listed in the enum definition. "false" otherwise

func (Type) String

func (i Type) String() string


Path Synopsis

Jump to

Keyboard shortcuts

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