Documentation ¶
Index ¶
- func ParseSource(file string, bytes []byte, snip Snip) (err error)
- func WriteJsonModel(w io.Writer, name string, m *M.Model) (err error)
- func WriteModel(w io.Writer, s ModelSnippet) (err error)
- func WriteSnippets(w io.Writer, cx *CallExtractor, packages ...string) (err error)
- type CallExtractor
- type ModelConfig
- type ModelSnippet
- type Snip
- type Snippet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseSource ¶
ParseSource, the original .go files on disk, and generate file, line, and source code snippers for every callback encountered.
func WriteModel ¶
func WriteModel(w io.Writer, s ModelSnippet) (err error)
cool, but unless we can deep copy the output, this is useless
func WriteSnippets ¶
func WriteSnippets(w io.Writer, cx *CallExtractor, packages ...string) (err error)
Types ¶
type CallExtractor ¶
type CallExtractor struct {
// contains filtered or unexported fields
}
func NewCallExtractor ¶
func NewCallExtractor(pkgname string, path string, trace io.Writer) *CallExtractor
path, optional, for more readable strings.
func (*CallExtractor) CompileCallback ¶
CompileCallback implments the compiler interface to turn a callback function into a callback marker.
func (*CallExtractor) Count ¶
func (cx *CallExtractor) Count() int
func (*CallExtractor) Find ¶
func (cx *CallExtractor) Find(k string) bool
func (*CallExtractor) Trace ¶
func (cx *CallExtractor) Trace(args ...interface{})
type ModelConfig ¶
type ModelConfig struct {
// contains filtered or unexported fields
}
func NewModelConfig ¶
func NewModelConfig(m *M.Model) *ModelConfig
func (*ModelConfig) GetSnippet ¶
func (cfg *ModelConfig) GetSnippet() ModelSnippet
func (*ModelConfig) PackageName ¶
func (cfg *ModelConfig) PackageName(s string) *ModelConfig
type ModelSnippet ¶
Click to show internal directories.
Click to hide internal directories.