description

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Description

type Description struct {
	Text   string `json:"text"`
	Format Format `json:"format,omitempty" toml:",omitempty"`
}

Description - representation of a blurb of a book.

type Format

type Format uint8

Format - representation of formats of texts.

const (
	Undefined Format = iota
	Plain
	Markdown
	HTML
)

func ParseFormat

func ParseFormat(s string) (Format, error)

Convert a string to a Format, returns an error if the string is unknown.

func (Format) MarshalText

func (g Format) MarshalText() ([]byte, error)

func (Format) String

func (g Format) String() string

String allows Format to implement fmt.Stringer.

func (*Format) UnmarshalText

func (g *Format) UnmarshalText(data []byte) (err error)

Jump to

Keyboard shortcuts

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