Documentation ¶
Index ¶
- func ActionCopy(ctx context.Context, log logger.Logger, args []string, options *CommonOptions) error
- func ActionMove(ctx context.Context, log logger.Logger, args []string, options *CommonOptions) error
- func ActionRemove(ctx context.Context, log logger.Logger, args []string, options *CommonOptions) error
- func ActionReplace(ctx context.Context, log logger.Logger, args []string, options *CommonOptions) error
- type ActionFunc
- type CommonOptions
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
Click to show internal directories.
Click to hide internal directories.