bundler

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bundler

type Bundler struct {
	// contains filtered or unexported fields
}

Bundler is responsible for preparing and archiving a bundle of files from a root directory

func New

func New(root string, fsys fs.FS, opts ...Option) *Bundler

New creates a new Bundler instance rooted at at the given directory and using the provided fs.FS.

func (*Bundler) Build

func (b *Bundler) Build(w io.Writer) error

Build prepares the list of files to archive, processes the manifest, and writes the resulting archive as a compressed tar.gz to the provided io.Writer.

type FileFilter

type FileFilter func(path string) bool

FileFilter is a function that determines whether a given file path should be included (returns true) or excluded (returns false) from the bundle.

type Option

type Option func(*Bundler)

func WithFilters

func WithFilters(filters ...FileFilter) Option

WithFilters adds additional FileFilters to control which files are included.

func WithGithubRef

func WithGithubRef(ref string) Option

WithGithubRef sets the GitHub ref string to be used for manifest substitution. The ref should be in the format "refs/tags/v1.2.3".

Jump to

Keyboard shortcuts

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