util

package
v0.0.0-...-3f5de73 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chunkify

func Chunkify(scanner *bufio.Scanner, chunkSize int) []string

Chunkify splits a string into chunks of a given size. The final chunk may be smaller than the specified size.

func ExtractInnerText

func ExtractInnerText(n *html.Node) string

extractInnerText approximates the behavior of document.innerText by extracting visible text from an HTML node.

func HttpGet

func HttpGet(url string) (io.ReadCloser, error)

func HttpGetHTML

func HttpGetHTML(url string) (string, error)

func HttpGetText

func HttpGetText(url string) (string, error)

func TrimMessage

func TrimMessage(content string) string

TrimMessage trims leading and trailing whitespace from a message's content.

Types

This section is empty.

Jump to

Keyboard shortcuts

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