printer

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TypeStrings

func TypeStrings() []string

TypeStrings returns a slice of all String values of the enum

Types

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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