md

package
v0.0.0-...-540bb61 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReplaceSection

func ReplaceSection(in, replace, section string) (string, error)

func ReplaceSections

func ReplaceSections(in string, sections map[string]string) (string, error)

func ReplaceSectionsInFile

func ReplaceSectionsInFile(path string, sections map[string]string) error

func WrapWithNewLines

func WrapWithNewLines(in string) string

func WrapWithSegment

func WrapWithSegment(in, segment string) string

func WrapWithYAMLSegment

func WrapWithYAMLSegment(in string) string

Types

type Column

type Column interface {
	Name() string
	Align() ColumnAlign

	ID() string
}

func NewColumn

func NewColumn(name string, align ColumnAlign) Column

type ColumnAlign

type ColumnAlign int
const (
	ColumnRightAlign ColumnAlign = iota
	ColumnCenterAlign
	ColumnLeftAlign
)

type Columns

type Columns []Column

func (Columns) Get

func (c Columns) Get(id string) (Column, bool)

type Table

type Table interface {
	Render() string

	AddRow(in map[Column]string) error
}

func NewTable

func NewTable(columns ...Column) Table

Jump to

Keyboard shortcuts

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