lambgofile

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package lambgofile assists with loading and representing .lambgo.yml files.

Index

Constants

View Source
const ExampleFile = `` /* 876-byte string literal not displayed */

ExampleFile for use in error messages and CLI help menus.

Variables

View Source
var (
	ErrCannotFindGoModule  = erk.New(ErkCannotLoadConfig{}, "Cannot find root go.mod file by searching parent working directories")
	ErrCannotParseGoModule = erk.New(ErkCannotLoadConfig{}, "Cannot read module path from go.mod file: {{.path}}")
	ErrCannotOpenFile      = erk.New(ErkCannotLoadConfig{}, "Cannot open the file '{{.path}}': {{.err}}")
	ErrCannotUnmarshalFile = erk.New(ErkCannotLoadConfig{}, "Cannot parse the file '{{.path}}': {{.err}}")
	ErrCannotParseFlags    = erk.New(ErkCannotLoadConfig{}, "Cannot parse build flags '{{.flags}}': {{.err}}")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	NumParallel int    `yaml:"-"`
	RootPath    string `yaml:"-"`
	ModulePath  string `yaml:"-"`

	OutDirectory   string   `yaml:"outDirectory"`
	ZippedFileName string   `yaml:"zippedFileName"`
	RawBuildFlags  string   `yaml:"buildFlags"`
	Goos           string   `yaml:"goos"`
	Goarch         string   `yaml:"goarch"`
	BuildFlags     []string `yaml:"-"`
	BuildPaths     []string `yaml:"buildPaths"`
}

Config is the root of the .lambgo.yml file.

type ErkCannotLoadConfig

type ErkCannotLoadConfig struct{ erk.DefaultKind }

type Loader

type Loader struct {
	FS fs.FS
}

Loader allows loading the project's .lambgo.yml file.

func (*Loader) LoadConfig

func (l *Loader) LoadConfig(pwd string) (*Config, error)

LoadConfig from the .lambgo.yml file that is located in pwd or a parent of pwd.

type LoaderAPI

type LoaderAPI interface {
	LoadConfig(pwd string) (*Config, error)
}

Jump to

Keyboard shortcuts

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