clean

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package clean provides a task to remove filesystem paths, e.g. output data like artifacts and reports from previous development, test, production and distribution builds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

Option is a task option.

func WithLimitToAppOutputDir

func WithLimitToAppOutputDir(limitToAppOutputDir bool) Option

WithLimitToAppOutputDir indicates whether only paths within the configured application output directory should be allowed.

func WithPaths

func WithPaths(paths ...string) Option

WithPaths sets the paths to remove. Note that only paths within the configured application output directory are allowed when WithLimitToAppOutputDir is enabled.

type Options

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

Options are task options.

func NewOptions

func NewOptions(opts ...Option) *Options

NewOptions creates new task options.

type Task

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

Task is a task to remove filesystem paths, e.g. output data like artifacts and reports from previous development, test, production and distribution builds.

func New

func New(proj project.Metadata, ac app.Config, opts ...Option) *Task

New creates a new task.

func (*Task) Clean

func (t *Task) Clean() ([]string, error)

Clean removes the configured paths. It returns an error of type *param.ErrGoCode for any error that occurs during the execution of the Go code.

func (*Task) Name added in v0.6.0

func (t *Task) Name() string

Name returns the task name.

func (*Task) Options

func (t *Task) Options() task.Options

Options returns the task options.

Jump to

Keyboard shortcuts

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