html2text

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 License: MIT Imports: 3 Imported by: 0

README

html2text

Simple html to text converter.

How to install

go get github.com/causelovem/html2text

How to use

package main

import (
	"fmt"

	"github.com/causelovem/html2text"
)

func main() {
	html := `<div><h1>some text</h1></div> <p>to be <b>cleared</b> </br> from &quot;html&quot; &lt;tags&gt;</p>`

	text := html2text.HTML2Text(html)

	fmt.Println(text)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HTML2Text

func HTML2Text(htmlString string) string

HTML2Text extracts text from html

Types

This section is empty.

Jump to

Keyboard shortcuts

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