gopmod

package
v1.0.32 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagGoAsGoPlus = 1 << iota
)

Variables

View Source
var (
	GOPVERSION   = env.Version()
	GOPBUILDDATE = env.BuildDate()
	GOPBUILDREV  = env.BuildRevision()
	GOPROOT      = env.GOPROOT()
)

Functions

func LoadFlags

func LoadFlags() string

Types

type Context

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

func New

func New(dir string) *Context

func NewDefault

func NewDefault(dir string) *Context

func (*Context) GoCommand

func (p *Context) GoCommand(op string, src *Project) GoCmd

func (*Context) OpenProject

func (p *Context) OpenProject(flags int, args ...string) (proj *Project, err error)

type Fingerp added in v1.0.32

type Fingerp struct {
	Hash    [20]byte
	ModTime time.Time
}

type GoCmd

type GoCmd struct {
	*exec.Cmd
	// contains filtered or unexported fields
}

func (GoCmd) IsValid

func (p GoCmd) IsValid() bool

func (GoCmd) Run

func (p GoCmd) Run() error

type Project

type Project struct {
	Source
	AutoGenFile   string // autogen file of output
	FriendlyFname string // friendly fname of source
	BuildArgs     []string
	ExecArgs      []string
	UseDefaultCtx bool
	ForceToGen    bool
	FlagNRINC     bool // do not run if not changed
	FlagRTOE      bool // remove tempfile on error
}

type Source

type Source interface {
	Fingerp() (*Fingerp, error) // source code fingerprint
	GenGo(outFile, modFile string) error
}

Jump to

Keyboard shortcuts

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