Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrEncoderClosed = errors.New("encoder is already closed")
)
Functions ¶
func NewDecoder ¶
func NewDecoder(r io.Reader) (io.ReadCloser, error)
NewDecoder extracts payload from an AMP page body r.
Types ¶
type Encoder ¶
type Encoder struct { // UseOldBoilerplate sets Encoder to write // deprecated AMP boilerplate. As it's much shorter // than the new one, one may benefit from using it // to save some bandwidth. // Note that it may stop working in future. UseOldBoilerplate bool // contains filtered or unexported fields }
Encoder is an instance of AMP HTML encoder.
func NewEncoder ¶
type PaddingWriter ¶
type PaddingWriter struct {
// contains filtered or unexported fields
}
PaddingWriter in an io.WriteCloser wrapper which inserts pads each step.
func NewPaddingWriter ¶
func NewPaddingWriter(w io.WriteCloser, pad string, step int) *PaddingWriter
NewPaddingWriter creates a PaddingWriter which writes pad each step bytes.
func (*PaddingWriter) Close ¶
func (pw *PaddingWriter) Close() error
Close closes underlying io.WriteCloser. It's an error to Write after Close.
Click to show internal directories.
Click to hide internal directories.