Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureDir ¶
EnsureDir ensures that a target directory exists (like `mkdir -p`), returning a non-nil error if any problem occurs.
func EnsureFileDir ¶
EnsureFileDir ensures that a target file's parent directory exists, returning a non-nil error if any problem occurs.
Types ¶
type GenWriter ¶
type GenWriter struct {
// contains filtered or unexported fields
}
GenWriter adds some convenient helpers atop a buffered writer.
func (*GenWriter) Buffer ¶
Buffer returns whatever has been written to the in-memory buffer (in non-file cases).
func (*GenWriter) EmitHeaderWarning ¶
EmitHeaderWarning emits the standard "WARNING" into a generated file, prefixed by commentChars.
func (*GenWriter) Writefmt ¶
Writefmt wraps the bufio.Writer.WriteString function, but also performs fmt.Sprintf-style formatting.
func (*GenWriter) Writefmtln ¶
Writefmtln wraps the bufio.Writer.WriteString function, performing fmt.Sprintf-style formatting and appending \n.