Help us shape the future of Go! Take the 2026 Go Developer Survey

htmltext

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package htmltext extracts readable text from HTML. It is a lightweight conversion, not a full HTML parser, shared by the web_fetch tool and the rag HTML parser.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Text

func Text(s string) string

Text extracts readable text from HTML. Scripts, styles and comments are dropped, block elements start new lines and entities are decoded.

func Title

func Title(s string) string

Title returns the text of the document's <title> element, or "".

Types

This section is empty.

Jump to

Keyboard shortcuts

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