build

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserModulePath  = "github.com/Ceinl/plums-user"
	PlumsModulePath = "github.com/Ceinl/plums"
)

Variables

This section is empty.

Functions

func Build

func Build(ctx context.Context, opts Options) (string, error)

func CacheKey

func CacheKey(configDir string, opts Options) (string, error)

func CachedOutputPath

func CachedOutputPath(key string) (string, error)

func DefaultConfigDir

func DefaultConfigDir() (string, error)

func DefaultOutputPath

func DefaultOutputPath() (string, error)

func GenerateGoMod

func GenerateGoMod(opts Options) string

func GenerateMain

func GenerateMain(opts Options) string

func GenerateMainForModule

func GenerateMainForModule(opts Options, modulePath string) string

func ModulePath

func ModulePath(configDir string) (string, error)

func ModuleVersion

func ModuleVersion(version string) string

func TidyConfigDir

func TidyConfigDir(ctx context.Context, configDir string, stdout, stderr io.Writer) error

TidyConfigDir runs `go mod tidy` in configDir when go.sum is missing, so a freshly seeded config module resolves its imports in editors (gopls needs go.sum entries) without the user running go commands by hand. Callers treat failure as non-fatal: the auto-build path tidies its own work module anyway, and an offline first launch should not break seeding.

Types

type Options

type Options struct {
	ConfigDir      string
	OutputPath     string
	WorkDir        string
	PlumsModuleDir string
	PlumsVersion   string
	Version        string
	Commit         string
	BuildDate      string
	Force          bool
	Stdout         io.Writer
	Stderr         io.Writer
}

Jump to

Keyboard shortcuts

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