genutils

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LookupOutput

func LookupOutput(output string) (genall.OutputRule, error)

LookupOutput looks up an output rule based on an output string.

Types

type OutputPackage

type OutputPackage struct{}

OutputPackage outputs artifacts to the original package location.

func (OutputPackage) Open

func (o OutputPackage) Open(pkg *loader.Package, itemPath string) (io.WriteCloser, error)

func (OutputPackage) PackageRef

func (o OutputPackage) PackageRef(pkg *loader.Package) (string, string)

type OutputSubpackage

type OutputSubpackage struct {
	// Prefix added to the package name.
	Prefix string `marker:",optional"`

	// Package is the main package name. When empty, the original package name is used.
	Package string `marker:",optional"`

	// Suffix added to the package name.
	Suffix string `marker:",optional"`
}

OutputSubpackage outputs artifacts to a subpackage of the original package.

func (OutputSubpackage) Open

func (o OutputSubpackage) Open(pkg *loader.Package, itemPath string) (io.WriteCloser, error)

func (OutputSubpackage) PackageRef

func (o OutputSubpackage) PackageRef(pkg *loader.Package) (string, string)

type PackageRefer

type PackageRefer interface {
	PackageRef(pkg *loader.Package) (string, string)
}

PackageRefer returns package reference (name and path) based on the output rule.

Jump to

Keyboard shortcuts

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