utils

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorsDefault = iota
	ColorsForced
	ColorsDisabled
)

Variables

This section is empty.

Functions

func CSSQuery added in v1.1.0

func CSSQuery(reader io.Reader, writer io.Writer, query string, attr string, options QueryOptions) error

func FormatHtml added in v1.0.0

func FormatHtml(reader io.Reader, writer io.Writer, indent string, colors int) error

func FormatJson added in v1.2.0

func FormatJson(reader io.Reader, writer io.Writer, indent string, colors int) error

func FormatXml

func FormatXml(reader io.Reader, writer io.Writer, indent string, colors int) error

func IsHTML added in v1.1.1

func IsHTML(input string) bool

func IsJSON added in v1.2.0

func IsJSON(input string) bool

func PagerPrint

func PagerPrint(reader io.Reader, writer io.Writer) error

func XPathQuery

func XPathQuery(reader io.Reader, writer io.Writer, query string, singleNode bool, options QueryOptions) (errRes error)

Types

type ContentType added in v1.2.0

type ContentType int
const (
	ContentXml ContentType = iota
	ContentHtml
	ContentJson
	ContentText
)

type QueryOptions added in v1.2.0

type QueryOptions struct {
	WithTags bool
	Indent   string
	Colors   int
}

Jump to

Keyboard shortcuts

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