actions

package
v0.0.0-...-4a61b4d Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActionCopy

func ActionCopy(ctx context.Context, log logger.Logger, args []string, options *CommonOptions) error

ActionCopy is used to copy directory or file from src to dest Its args prototype is:

args: (src string, dest string)

func ActionMove

func ActionMove(ctx context.Context, log logger.Logger, args []string, options *CommonOptions) error

ActionMove is used to move directory or file from src to dest Its args prototype is:

args: (src string, dest string)

func ActionRemove

func ActionRemove(ctx context.Context, log logger.Logger, args []string, options *CommonOptions) error

ActionRemove is used to delete directories or files Its args prototype is:

args: (path ...string)

func ActionReplace

func ActionReplace(ctx context.Context, log logger.Logger, args []string, options *CommonOptions) error

ActionReplace is used to replace text in bulk Its args prototype is:

args: (pattern string, from string, to string)

pattern is used to match files

Types

type ActionFunc

type ActionFunc func(ctx context.Context,
	log logger.Logger,
	args []string, options *CommonOptions) error

ActionFunc defines the common prototype of action func

type CommonOptions

type CommonOptions struct {
	ConfigFilePath string
}

CommonOptions is common options of action

Jump to

Keyboard shortcuts

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