golang

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Tag               = "go"
	Name              = "golang"
	BinName           = clpath.Base(clpath.Pwd())
	Summary           = "Custom Go-Enjin Service"
	Version           = "v0.0.0"
	BeEnvPrefix       = strcase.ToScreamingSnake(BinName)
	GoEnvFileName     = "env"
	GoTmpDirName      = "tmp"
	GoCacheDirName    = "cache"
	GoModCacheDirName = "modcache"
)
View Source
var CliBuildFlags = []cli.Flag{
	&cli.BoolFlag{
		Name:    "optimize",
		Usage:   "configure for reproducible go builds (-trimpath, etc)",
		EnvVars: []string{"ENJENV_GO_OPTIMIZE"},
	},
	&cli.BoolFlag{
		Name:    "finalize",
		Usage:   "create a Shasums from a Shafile and embed the integrity values for --strict runtime checks",
		EnvVars: []string{"ENJENV_GO_FINALIZE"},
	},
	&cli.StringFlag{
		Name:    "be-app-name",
		Usage:   "set -o and -ldflags -X for be.AppName",
		EnvVars: []string{"BE_APP_NAME"},
	},
	&cli.StringFlag{
		Name:    "be-summary",
		Usage:   "set -ldflags -X for be.Summary",
		EnvVars: []string{"BE_SUMMARY"},
	},
	&cli.StringFlag{
		Name:    "be-version",
		Usage:   "set -ldflags -X for be.Version",
		EnvVars: []string{"BE_VERSION"},
	},
	&cli.StringFlag{
		Name:    "be-release",
		Usage:   "set -ldflags -X for be.Release",
		EnvVars: []string{"BE_RELEASE"},
	},
	&cli.StringFlag{
		Name:    "be-env-prefix",
		Usage:   "set -ldflags -X for be.EnvPrefix",
		EnvVars: []string{"BE_ENV_PREFIX"},
	},
	&cli.StringFlag{
		Name:    "be-bin-name",
		Usage:   "specify the binary name to produce (overrides --be-app-name)",
		Aliases: []string{"o"},
		EnvVars: []string{"ENJENV_GO_OUTPUT"},
	},
	&cli.StringFlag{
		Name:    "ldflags",
		Usage:   "specify additional ldflags to include",
		EnvVars: []string{"ENJENV_GO_LDFLAGS"},
	},
	&cli.StringFlag{
		Name:    "gcflags",
		Usage:   "specify additional gcflags to include",
		EnvVars: []string{"ENJENV_GO_GCFLAGS"},
	},
	&cli.BoolFlag{
		Name:    "verbose",
		Usage:   "pass -v to go build invocation",
		EnvVars: []string{"ENJENV_GO_VERBOSE"},
	},
	&cli.StringFlag{
		Name:    "config",
		Usage:   "specify a TOML config file to use",
		EnvVars: []string{"ENJENV_GO_CONFIG"},
	},
}

Functions

This section is empty.

Types

type System

type System struct {
	system.CSystem
}

func New

func New() (s *System)

func (*System) ActionGoBuild

func (s *System) ActionGoBuild(ctx *cli.Context) (err error)

func (*System) ActionGoModLocal

func (s *System) ActionGoModLocal(ctx *cli.Context) (err error)

func (*System) ActionGoModUnLocal

func (s *System) ActionGoModUnLocal(ctx *cli.Context) (err error)

func (*System) Export

func (s *System) Export(ctx *cli.Context) (err error)

func (*System) ExportString

func (s *System) ExportString(ctx *cli.Context) (content string, err error)

func (*System) ExtraCommands

func (s *System) ExtraCommands(app *cli.App) (commands []*cli.Command)

func (*System) GetDefaultVersion

func (s *System) GetDefaultVersion() (version string)

func (*System) GetInstalledVersion

func (s *System) GetInstalledVersion() (version string, err error)

func (*System) GetKnownSums

func (s *System) GetKnownSums() (sums map[string]string, err error)

func (*System) GoBin

func (s *System) GoBin(name string, argv ...string) (status int, err error)

func (*System) GoBinWith added in v0.1.3

func (s *System) GoBinWith(environ []string, path, name string, argv ...string) (err error)

func (*System) IncludeCommands

func (s *System) IncludeCommands(app *cli.App) (commands []*cli.Command)

func (*System) Init

func (s *System) Init(this interface{})

func (*System) MakeDirs

func (s *System) MakeDirs() (err error)

func (*System) NancyBin

func (s *System) NancyBin(argv ...string) (status int, err error)

func (*System) ParseFileName

func (s *System) ParseFileName(path string) (version, osName, osArch string, err error)

func (*System) ParseVersionString

func (s *System) ParseVersionString(ver string) (version string, err error)

func (*System) Prepare

func (s *System) Prepare(ctx *cli.Context) (err error)

func (*System) UnExport

func (s *System) UnExport(ctx *cli.Context) (err error)

func (*System) UnExportString

func (s *System) UnExportString(ctx *cli.Context) (content string, err error)

Jump to

Keyboard shortcuts

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