mkuimage

package
v0.0.0-...-899a47e Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: BSD-3-Clause Imports: 12 Imported by: 1

Documentation

Overview

Package mkuimage defines mkuimage flags and creation function.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUimage

func CreateUimage(l *llog.Logger, base []uimage.Modifier, tf *TemplateFlags, f *Flags, args []string) error

CreateUimage creates a uimage with the given base modifiers and flags, using args as the list of commands.

func String

func String(s string) *string

String can be used to fill in values for Init, Uinit, and Shell.

Types

type CommandFlags

type CommandFlags struct {
	NoCommands bool
	Builder    string
	ShellBang  bool
	Mod        golang.ModBehavior
	BuildTags  []string
	BuildOpts  *golang.BuildOpts
}

CommandFlags are flags related to Go commands to be built by mkuimage.

func (*CommandFlags) Modifiers

func (c *CommandFlags) Modifiers(packages ...string) ([]uimage.Modifier, error)

Modifiers turns the flag values into uimage modifiers.

func (*CommandFlags) RegisterFlags

func (c *CommandFlags) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers flags related to Go commands being built.

type Flags

type Flags struct {
	TempDir     *string
	KeepTempDir bool

	Init  *string
	Uinit *string
	Shell *string

	Files []string

	BaseArchive     string
	ArchiveFormat   string
	OutputFile      string
	UseExistingInit bool

	Commands CommandFlags
}

Flags are mkuimage command-line flags.

func (*Flags) Modifiers

func (f *Flags) Modifiers(packages ...string) ([]uimage.Modifier, error)

Modifiers return uimage modifiers created from the flags.

func (*Flags) RegisterFlags

func (f *Flags) RegisterFlags(fs *flag.FlagSet)

RegisterFlags registers flags.

type TemplateFlags

type TemplateFlags struct {
	File   string
	Config string
}

TemplateFlags are flags for uimage config templates.

func (*TemplateFlags) Get

func (tc *TemplateFlags) Get() (*templates.Templates, error)

Get turns template flags into templates.

func (*TemplateFlags) RegisterFlags

func (tc *TemplateFlags) RegisterFlags(f *flag.FlagSet)

RegisterFlags registers template flags.

Jump to

Keyboard shortcuts

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