handwriting

package module
v0.0.0-...-2e69b07 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2018 License: MIT Imports: 21 Imported by: 0

README

handwriting

handwriting go code

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithConfig

func WithConfig(c *loader.Config) func(*Planner)

WithConfig :

func WithConsoleOutput

func WithConsoleOutput() func(*Planner)

WithConsoleOutput :

func WithOpener

func WithOpener(o multifile.Opener) func(*Planner)

WithOpener :

Types

type Emitter

type Emitter struct {
	Prog     *loader.Program
	Resolver *nameresolve.Resolver
	PkgInfo  *loader.PackageInfo
	Opener   multifile.Opener

	// options
	Format func(r io.Reader, w io.Writer) error
}

Emitter :

func (*Emitter) EmitCreated

func (e *Emitter) EmitCreated(info *loader.PackageInfo) error

EmitCreated :

func (*Emitter) EmitFile

func (e *Emitter) EmitFile(file *PlanningFile) error

EmitFile :

type File

type File struct {
	Prog     *loader.Program
	PkgInfo  *loader.PackageInfo
	Resolver *nameresolve.File
	Out      *indent.Output
	// contains filtered or unexported fields
}

File :

func (*File) CreateCaptureImportDetector

func (f *File) CreateCaptureImportDetector() *typesutil.PackageDetector

CreateCaptureImportDetector :

func (*File) FileName

func (f *File) FileName() string

FileName :

func (*File) MustUse

func (f *File) MustUse(name string) *lookup.PackageRef

MustUse :

func (*File) Use

func (f *File) Use(name string) (*lookup.PackageRef, error)

Use :

type Planner

type Planner struct {
	Pkg    *types.Package
	Config *loader.Config

	Files  map[string]*PlanningFile
	Opener multifile.Opener

	// options
	Format    func(r io.Reader, w io.Writer) error
	TypeCheck bool
}

Planner :

func Must

func Must(p *Planner, err error) *Planner

Must :

func New

func New(path string, ops ...func(*Planner)) (*Planner, error)

New :

func (*Planner) Emit

func (h *Planner) Emit() error

Emit :

func (*Planner) File

func (h *Planner) File(name string) *PlanningFile

File :

func (*Planner) Import

func (h *Planner) Import(path string)

Import :

type PlanningFile

type PlanningFile struct {
	Filename string
	Root     *Planner

	Setups  []func(*File) error
	Actions []func(*File) error
	// contains filtered or unexported fields
}

PlanningFile :

func (*PlanningFile) Code

func (f *PlanningFile) Code(fn func(*File) error)

Code :

func (*PlanningFile) Import

func (f *PlanningFile) Import(path string)

Import :

func (*PlanningFile) ImportWithName

func (f *PlanningFile) ImportWithName(path string, name string)

ImportWithName :

Jump to

Keyboard shortcuts

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