tinylog

package
v0.4.12 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Start = iota
	Title
	Metadata
	Description
	Posts
	End
)

Variables

This section is empty.

Functions

func CreateLogEntry

func CreateLogEntry(msg string) string

func InsertAuthor

func InsertAuthor(log string, author string) string

func InsertAvatar

func InsertAvatar(log string, avatar string) string

func InsertLicense

func InsertLicense(log string, license string) string

func InsertMetadata

func InsertMetadata(log string, prop string, data string) string

func InsertTitle

func InsertTitle(log string, title string) string

func SpliceEntryIntoTinylog

func SpliceEntryIntoTinylog(rawlog string, msg string) (string, error)

Types

type IncrementalParseResult

type IncrementalParseResult struct {
	Section Section
	Start   int
	End     int
}

type IncrementalParser

type IncrementalParser struct {
	// contains filtered or unexported fields
}

func NewIncrementalParser

func NewIncrementalParser(log string) *IncrementalParser

func (*IncrementalParser) ExtractMetadata

func (parser *IncrementalParser) ExtractMetadata(r IncrementalParseResult) string

func (*IncrementalParser) Next

type ParsedTinylog

type ParsedTinylog struct {
	Title       string
	Description string
	Author      string
	Avatar      string
	License     string
}

func ParseToFirstEntry

func ParseToFirstEntry(log string) *ParsedTinylog

type Section

type Section int

Jump to

Keyboard shortcuts

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