generator

package
Version: v0.0.0-...-7b05a7d Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2016 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateFiles

func GenerateFiles(goCmd string, inputPath string, outputPath string, importName string, forceRegenerate bool) error

func TempFileWithPostfix

func TempFileWithPostfix(dir, prefix string, postfix string) (f *os.File, err error)

TempFile creates a new temporary file in the directory dir with a name beginning with prefix, opens the file for reading and writing, and returns the resulting *os.File. If dir is the empty string, TempFile uses the default directory for temporary files (see os.TempDir). Multiple programs calling TempFile simultaneously will not choose the same file. The caller can use f.Name() to find the pathname of the file. It is the caller's responsibility to remove the file when no longer needed.

Types

type InceptionMain

type InceptionMain struct {
	TempMainPath string
	// contains filtered or unexported fields
}

func NewInceptionMain

func NewInceptionMain(goCmd string, inputPath string, outputPath string) *InceptionMain

func (*InceptionMain) Generate

func (im *InceptionMain) Generate(packageName string, si []*StructInfo, importName string) error

func (*InceptionMain) Run

func (im *InceptionMain) Run() error

type StructField

type StructField struct {
	Name string
}

type StructInfo

type StructInfo struct {
	Name    string
	Options shared.StructOptions
}

func ExtractStructs

func ExtractStructs(inputPath string) (string, []*StructInfo, error)

func NewStructInfo

func NewStructInfo(name string) *StructInfo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL