Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Source ¶ added in v0.14.0
type Source struct {
// contains filtered or unexported fields
}
Source stores a list of lines, typically a continuous section of source code that forms a part of (or the entirety of) a whole source file.
type SourceFile ¶
type SourceFile struct { Directory string Name string // without any directory components // contains filtered or unexported fields }
SourceFile contains a single file to be output, including both its content and location.
func NewFile ¶
func NewFile(directory, name string) *SourceFile
NewFile creates an empty SourceFile with the specified Directory and Name.
func (*SourceFile) Append ¶ added in v0.14.0
func (sf *SourceFile) Append(source *Source)
Append appends the lines in Source to the lines in SourceFile.
func (*SourceFile) Contents ¶
func (sf *SourceFile) Contents() string
Contents returns the stringified contents this SourceFile.
func (*SourceFile) P ¶
func (sf *SourceFile) P(format string, args ...interface{})
P appends a printf-formatted line to SourcerFile.
type View ¶
type View struct {
Files []*SourceFile
}
View contains a list of files to be output.
func (*View) Append ¶
func (view *View) Append(file *SourceFile) *SourceFile
Append appends file to this View.
Click to show internal directories.
Click to hide internal directories.