pkg

package
v0.0.0-...-bc7f4fd Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyAsValue

func KeyAsValue(token *SplitToken) string

func PublishAtDate

func PublishAtDate(date string) (*time.Time, error)

func SplitByNewline

func SplitByNewline(text string) []string

func TokenToMetaField

func TokenToMetaField(meta *MetaData, token *SplitToken)

Types

type ListItem

type ListItem struct {
	Value       string
	URL         template.URL
	Variable    string
	IsURL       bool
	IsBlock     bool
	IsText      bool
	IsHeaderOne bool
	IsHeaderTwo bool
	IsImg       bool
	IsPre       bool
}

type MetaData

type MetaData struct {
	PublishAt   *time.Time
	Title       string
	Description string
	ListType    string // https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type
}

type ParsedText

type ParsedText struct {
	Items    []*ListItem
	MetaData *MetaData
}

func ParseText

func ParseText(text string) *ParsedText

type SplitToken

type SplitToken struct {
	Key   string
	Value string
}

func TextToSplitToken

func TextToSplitToken(text string) *SplitToken

Jump to

Keyboard shortcuts

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