goldtext

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package goldtext holds tools for interacting with goldmark's text package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	// Source is the original source that the segments are for.
	Source []byte

	// Segments is a list of segments of Source
	// that should be exposed by the Reader.
	Segments *text.Segments
	// contains filtered or unexported fields
}

Reader is an io.Reader around a Goldmark text.Segments.

func (*Reader) Read

func (r *Reader) Read(bs []byte) (total int, err error)

Read reads from the underlying source and segments until the given byte slice is filled or the source runs out.

This implements the io.Reader interface.

func (*Reader) Reset

func (r *Reader) Reset()

Reset resets the position of Reader in its Source and Segments.

Jump to

Keyboard shortcuts

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