file

package
v1.1.37 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Embed

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

func (*Embed) LineNo

func (i *Embed) LineNo() int

func (*Embed) ParseLine

func (i *Embed) ParseLine(line string) error

func (*Embed) WriteTo

func (i *Embed) WriteTo(f table.Formatter) error

type EmptyLine

type EmptyLine int

func (EmptyLine) LineNo

func (e EmptyLine) LineNo() int

func (EmptyLine) ParseLine

func (e EmptyLine) ParseLine(string) error

func (EmptyLine) WriteTo

func (e EmptyLine) WriteTo(f table.Formatter) error

type File

type File struct {
	Score score
	Input *bufio.Scanner
	Parts []Part
	// contains filtered or unexported fields
}

func FromReader

func FromReader(rd io.Reader, s score) (f *File)

func New

func New(fpath string, s score) (f *File, err error)

func (*File) Close

func (f *File) Close()

func (*File) Format

func (f *File) Format() error

func (*File) Name

func (f *File) Name() string

func (*File) Parse

func (f *File) Parse() (err error)

func (*File) WriteDashLine added in v1.0.32

func (f *File) WriteDashLine(line string) (err error)

func (*File) WriteLine

func (f *File) WriteLine(line string) (err error)

func (*File) WriteTo

func (f *File) WriteTo(output io.Writer) (err error)

type Include

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

func (*Include) LineNo

func (i *Include) LineNo() int

func (*Include) ParseLine

func (i *Include) ParseLine(line string) error

func (*Include) WriteTo

func (i *Include) WriteTo(f table.Formatter) error

type MultiLineComment

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

func (*MultiLineComment) Contains

func (m *MultiLineComment) Contains(lineno int) bool

func (*MultiLineComment) End

func (m *MultiLineComment) End() int

func (*MultiLineComment) Start

func (m *MultiLineComment) Start() int

type Part

type Part interface {
	LineNo() int
	WriteTo(table.Formatter) error
	ParseLine(string) error
}

Jump to

Keyboard shortcuts

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