mc

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerInfos

type DockerInfos struct {
	Registry string
	Image    string
	Usr      string
	Pwd      string
	// contains filtered or unexported fields
}

DockerInfos holds information regarding docker

type Env added in v0.0.3

type Env struct {
	Gocmd string
}

Env holds environment variables

type GitInfos

type GitInfos struct {
	Rev            string
	TagAtRev       string
	LatestTag      string
	RevAtLatestTag string
	// contains filtered or unexported fields
}

GitInfos holds information regarding git

type MageDir

type MageDir struct {
	Workdir string
	// contains filtered or unexported fields
}

MageDir holds the shareable information for Mage

func NewMageDir

func NewMageDir(workdir string, env Env) *MageDir

NewMageDir creates a Commons structure

func (*MageDir) DockerDetails

func (c *MageDir) DockerDetails(registry, image, user string) *DockerInfos

DockerDetails aggregates the information regarding docker

func (*MageDir) Format

func (c *MageDir) Format() error

Format formats code via gofmt

func (*MageDir) GitDetails

func (c *MageDir) GitDetails() (*GitInfos, error)

GitDetails aggregates the information regarding git

func (*MageDir) InstallDeps added in v0.1.0

func (c *MageDir) InstallDeps() error

InstallDeps installs the additional dependencies: goimports & golint

func (*MageDir) Lint

func (c *MageDir) Lint() error

Lint runs golint linter

func (*MageDir) ProjectDetails

func (c *MageDir) ProjectDetails() (*ProjectInfos, error)

ProjectDetails aggregates the information regarding the go project

func (*MageDir) Version added in v0.0.3

func (c *MageDir) Version() string

Version extracts version from git tag

func (*MageDir) Vet

func (c *MageDir) Vet() error

Vet runs go vet linter

func (*MageDir) ZipFiles added in v0.0.4

func (c *MageDir) ZipFiles(filename string, files []string) error

ZipFiles compresses one or many files into a single zip archive file. The original code was published under MIT licence under https://golangcode.com/create-zip-files-in-go/

type ProjectInfos

type ProjectInfos struct {
	Pkgs []string
	// contains filtered or unexported fields
}

ProjectInfos holds information regarding the go project

Jump to

Keyboard shortcuts

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