htmlpipeline

package module
v0.0.0-...-48a9c44 Latest Latest
Warning

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

Go to latest
Published: May 27, 2018 License: MIT Imports: 4 Imported by: 0

README

go-htmlpipeline

CircleCI GoDoc

HTML processing library for Go.

This library is a Go implementation of the Ruby library html-pipeline.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

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

Context carries the HTML and/or goquery.Document between pipelines.

func NewContext

func NewContext(html string) *Context

func (*Context) Document

func (ctx *Context) Document() (*goquery.Document, error)

func (*Context) HTML

func (ctx *Context) HTML() (string, error)

func (*Context) WriteDocument

func (ctx *Context) WriteDocument(doc *goquery.Document) error

func (*Context) WriteHTML

func (ctx *Context) WriteHTML(input string) error

type Filter

type Filter interface {
	Render(*Context) error
}

type Pipeline

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

func New

func New(filters ...Filter) *Pipeline

func (*Pipeline) Render

func (p *Pipeline) Render(input string) (string, error)

Directories

Path Synopsis
_examples

Jump to

Keyboard shortcuts

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