files

package
v0.0.0-...-3fcbef7 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2019 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoFile

type GoFile struct {
	Pkg string
	// contains filtered or unexported fields
}

func NewGoFile

func NewGoFile(base string, path string, name string, overwrite bool, merge bool) *GoFile

func (*GoFile) AddImport

func (f *GoFile) AddImport(alias string, path ...string)

func (*GoFile) Base

func (f *GoFile) Base() string

func (*GoFile) C

func (f *GoFile) C(s string)

func (*GoFile) Cf

func (f *GoFile) Cf(format string, args ...interface{})

func (*GoFile) Cs

func (f *GoFile) Cs(s ...string)

func (*GoFile) Extension

func (f *GoFile) Extension() string

func (*GoFile) FormatComments

func (f *GoFile) FormatComments(cs ...string) (fcs []string)

func (*GoFile) HasImport

func (f *GoFile) HasImport(path ...string) bool

func (*GoFile) I

func (f *GoFile) I(path string) string

func (*GoFile) IsEmpty

func (f *GoFile) IsEmpty() bool

func (*GoFile) Merge

func (f *GoFile) Merge() bool

func (*GoFile) Name

func (f *GoFile) Name() string

func (*GoFile) Overwrite

func (f *GoFile) Overwrite() bool

func (*GoFile) P

func (f *GoFile) P(s string)

func (*GoFile) Path

func (f *GoFile) Path() string

func (*GoFile) Pf

func (f *GoFile) Pf(format string, args ...interface{})

func (*GoFile) Ps

func (f *GoFile) Ps(s ...string)

func (*GoFile) WriteTo

func (f *GoFile) WriteTo(w io.Writer) (int64, error)

type ProtoFile

type ProtoFile struct {
	TextFile
	Pkg string
	// contains filtered or unexported fields
}

func NewProtoFile

func NewProtoFile(base string, path string, name string, overwrite bool, merge bool) *ProtoFile

func (*ProtoFile) AddImport

func (f *ProtoFile) AddImport(alias string, path ...string)

func (*ProtoFile) Base

func (f *ProtoFile) Base() string

func (*ProtoFile) Extension

func (f *ProtoFile) Extension() string

func (*ProtoFile) HasImport

func (f *ProtoFile) HasImport(path ...string) bool

func (*ProtoFile) IsEmpty

func (f *ProtoFile) IsEmpty() bool

func (*ProtoFile) Merge

func (f *ProtoFile) Merge() bool

func (*ProtoFile) Name

func (f *ProtoFile) Name() string

func (*ProtoFile) Overwrite

func (f *ProtoFile) Overwrite() bool

func (*ProtoFile) Path

func (f *ProtoFile) Path() string

func (*ProtoFile) WriteTo

func (f *ProtoFile) WriteTo(w io.Writer) (int64, error)

type TextFile

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

func NewTextFile

func NewTextFile(base string, path string, name string, ext string, overwrite bool, merge bool) *TextFile

func (*TextFile) AddImport

func (f *TextFile) AddImport(alias string, path ...string)

func (*TextFile) Base

func (f *TextFile) Base() string

func (*TextFile) C

func (f *TextFile) C(s string)

func (*TextFile) Cf

func (f *TextFile) Cf(format string, args ...interface{})

func (*TextFile) CommentFormat

func (f *TextFile) CommentFormat(format string)

func (*TextFile) Cs

func (f *TextFile) Cs(s ...string)

func (*TextFile) Extension

func (f *TextFile) Extension() string

func (*TextFile) FormatComments

func (f *TextFile) FormatComments(cs ...string) (fcs []string)

func (*TextFile) HasImport

func (f *TextFile) HasImport(path ...string) bool

func (*TextFile) IsEmpty

func (f *TextFile) IsEmpty() bool

func (*TextFile) Merge

func (f *TextFile) Merge() bool

func (*TextFile) Name

func (f *TextFile) Name() string

func (*TextFile) Overwrite

func (f *TextFile) Overwrite() bool

func (*TextFile) P

func (f *TextFile) P(s string)

func (*TextFile) Path

func (f *TextFile) Path() string

func (*TextFile) Pf

func (f *TextFile) Pf(format string, args ...interface{})

func (*TextFile) Ps

func (f *TextFile) Ps(s ...string)

func (*TextFile) WriteTo

func (f *TextFile) WriteTo(w io.Writer) (int64, error)

Jump to

Keyboard shortcuts

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