util

package
v0.0.0-...-4a31f58 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2017 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GOPASFILE = "gopasfile"
)

Variables

View Source
var PackageFound = errors.New("!!found")

Functions

This section is empty.

Types

type Dependency

type Dependency struct {
	Name    string
	Version string
}

*

  • Dependency type

type Logger

type Logger struct {
	Out, Err io.Writer
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(out io.Writer, err io.Writer) *Logger

func (*Logger) LogE

func (l *Logger) LogE(format string, args ...interface{})

func (*Logger) LogI

func (l *Logger) LogI(format string, args ...interface{})

type Project

type Project interface {
	Dependencies() []Dependency
	Clean() error
	Get(dependency Dependency) error
	Run(args ...string) error
	Test(cover bool, packages ...string) error
	PreBuild() error
	Build() error

	Name() string
	Dir() string
	GoRun(args ...string) error
}

*

  • Dependency type

type ProjectImpl

type ProjectImpl struct {
	*Logger
	Cwd string
	// contains filtered or unexported fields
}

*

  • Dependency type

func NewProject

func NewProject(logger *Logger, cwd string) *ProjectImpl

*

  • New project options and gopath dir

func (*ProjectImpl) Bootstrap

func (p *ProjectImpl) Bootstrap() error

func (*ProjectImpl) Build

func (p *ProjectImpl) Build() error

func (*ProjectImpl) Clean

func (p *ProjectImpl) Clean() error

func (*ProjectImpl) Dependencies

func (p *ProjectImpl) Dependencies() []Dependency

func (*ProjectImpl) Dir

func (p *ProjectImpl) Dir() string

func (*ProjectImpl) Env

func (p *ProjectImpl) Env() []string

func (*ProjectImpl) Get

func (p *ProjectImpl) Get(dependency Dependency) error

func (*ProjectImpl) GoRun

func (p *ProjectImpl) GoRun(args ...string) error

func (*ProjectImpl) Gopath

func (p *ProjectImpl) Gopath() []string

func (*ProjectImpl) Name

func (p *ProjectImpl) Name() string

func (*ProjectImpl) PreBuild

func (p *ProjectImpl) PreBuild() error

func (*ProjectImpl) Run

func (p *ProjectImpl) Run(args ...string) error

func (*ProjectImpl) Test

func (p *ProjectImpl) Test(cover bool, packages ...string) error

type Runner

type Runner struct {
	Name string
	Args []string
	Env  []string
	Dir  string
	Out  io.Writer
	Err  io.Writer
	// contains filtered or unexported fields
}

*

  • Runner type

func (*Runner) GetDir

func (r *Runner) GetDir() string

func (*Runner) GetEnv

func (r *Runner) GetEnv() []string

func (*Runner) IsExited

func (r *Runner) IsExited() bool

*

  • Check wether runner command already exit *
  • @return {bool}

func (*Runner) Kill

func (r *Runner) Kill() error

*

  • Kill runner command *
  • @return {error}

func (*Runner) Run

func (r *Runner) Run() error

*

  • Run command *
  • @return {*exec.Cmd}
  • @return {error}

func (*Runner) Wait

func (r *Runner) Wait() error

type Tool

type Tool struct {
	*Logger
	Project Project
}

func NewTool

func NewTool(logger *Logger, project Project) (*Tool, error)

func (*Tool) DoBuild

func (t *Tool) DoBuild(c *cli.Context) error

func (*Tool) DoClean

func (t *Tool) DoClean(c *cli.Context) error

func (*Tool) DoGo

func (t *Tool) DoGo(c *cli.Context) error

func (*Tool) DoInstall

func (t *Tool) DoInstall(c *cli.Context) error

func (*Tool) DoList

func (t *Tool) DoList(c *cli.Context) error

func (*Tool) DoRun

func (t *Tool) DoRun(c *cli.Context) error

func (*Tool) DoTest

func (t *Tool) DoTest(c *cli.Context) error

func (*Tool) DoWatch

func (t *Tool) DoWatch(c *cli.Context) error

type Watcher

type Watcher struct {
	*Logger
	Watches    []string
	Extensions []string
	Ignores    []string
	// contains filtered or unexported fields
}

func (*Watcher) Start

func (w *Watcher) Start() error

func (*Watcher) Watch

func (w *Watcher) Watch(cb func() (*Runner, error)) error

Jump to

Keyboard shortcuts

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