chezmoi

package
v1.8.11 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TemplateSuffix = ".tmpl"
)

Suffixes and prefixes.

Variables

View Source
var DefaultTemplateOptions = []string{"missingkey=error"}

DefaultTemplateOptions are the default template options.

Functions

func Debugf

func Debugf(format string, args []interface{}, f func() error) error

Debugf logs debugging information about calling f.

func GetUmask added in v1.8.8

func GetUmask() os.FileMode

GetUmask returns the umask.

func IsPrivate

func IsPrivate(fs vfs.Stater, path string, want bool) (bool, error)

IsPrivate returns whether path should be considered private.

func MaybeShellQuote

func MaybeShellQuote(s string) string

MaybeShellQuote returns s quoted as a shell argument, if necessary.

func SetUmask added in v1.8.8

func SetUmask(newUmask os.FileMode)

SetUmask sets the umask.

func ShellQuoteArgs

func ShellQuoteArgs(args []string) string

ShellQuoteArgs returs args shell quoted and joined into a single string.

Types

type AddOptions

type AddOptions struct {
	Empty        bool
	Encrypt      bool
	Exact        bool
	Recursive    bool
	Template     bool
	AutoTemplate bool
}

An AddOptions contains options for TargetState.Add.

type AnyMutator

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

An AnyMutator wraps another Mutator and records if any of its mutating methods are called.

func NewAnyMutator

func NewAnyMutator(m Mutator) *AnyMutator

NewAnyMutator returns a new AnyMutator.

func (*AnyMutator) Chmod

func (m *AnyMutator) Chmod(name string, mode os.FileMode) error

Chmod implements Mutator.Chmod.

func (*AnyMutator) IdempotentCmdOutput

func (m *AnyMutator) IdempotentCmdOutput(cmd *exec.Cmd) ([]byte, error)

IdempotentCmdOutput implements Mutator.IdempotentCmdOutput.

func (*AnyMutator) Mkdir

func (m *AnyMutator) Mkdir(name string, perm os.FileMode) error

Mkdir implements Mutator.Mkdir.

func (*AnyMutator) Mutated

func (m *AnyMutator) Mutated() bool

Mutated returns true if any of its methods have been called.

func (*AnyMutator) RemoveAll

func (m *AnyMutator) RemoveAll(name string) error

RemoveAll implements Mutator.RemoveAll.

func (*AnyMutator) Rename

func (m *AnyMutator) Rename(oldpath, newpath string) error

Rename implements Mutator.Rename.

func (*AnyMutator) RunCmd

func (m *AnyMutator) RunCmd(cmd *exec.Cmd) error

RunCmd implements Mutator.RunCmd.

func (*AnyMutator) Stat

func (m *AnyMutator) Stat(path string) (os.FileInfo, error)

Stat implements Mutator.Stat.

func (*AnyMutator) WriteFile

func (m *AnyMutator) WriteFile(name string, data []byte, perm os.FileMode, currData []byte) error

WriteFile implements Mutator.WriteFile.

func (m *AnyMutator) WriteSymlink(oldname, newname string) error

WriteSymlink implements Mutator.WriteSymlink.

type ApplyOptions

type ApplyOptions struct {
	DestDir           string
	DryRun            bool
	Ignore            func(string) bool
	PersistentState   PersistentState
	Remove            bool
	ScriptStateBucket []byte
	Stdout            io.Writer
	Umask             os.FileMode
	Verbose           bool
}

An ApplyOptions is a big ball of mud for things that affect Entry.Apply.

type BoltPersistentState

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

A BoltPersistentState is a state persisted with bolt.

func NewBoltPersistentState

func NewBoltPersistentState(fs vfs.FS, path string, options *bolt.Options) (*BoltPersistentState, error)

NewBoltPersistentState returns a new BoltPersistentState.

func (*BoltPersistentState) Close

func (b *BoltPersistentState) Close() error

Close closes b.

func (*BoltPersistentState) Delete

func (b *BoltPersistentState) Delete(bucket, key []byte) error

Delete deletes the value associate with key in bucket. If bucket or key does not exist then Delete does nothing.

func (*BoltPersistentState) Get

func (b *BoltPersistentState) Get(bucket, key []byte) ([]byte, error)

Get returns the value associated with key in bucket.

func (*BoltPersistentState) Set

func (b *BoltPersistentState) Set(bucket, key, value []byte) error

Set sets the value associated with key in bucket. bucket will be created if it does not already exist.

type DebugMutator

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

A DebugMutator wraps a Mutator and logs all of the actions it executes.

func NewDebugMutator

func NewDebugMutator(m Mutator) *DebugMutator

NewDebugMutator returns a new DebugMutator.

func (*DebugMutator) Chmod

func (m *DebugMutator) Chmod(name string, mode os.FileMode) error

Chmod implements Mutator.Chmod.

func (*DebugMutator) IdempotentCmdOutput

func (m *DebugMutator) IdempotentCmdOutput(cmd *exec.Cmd) ([]byte, error)

IdempotentCmdOutput implements Mutator.IdempotentCmdOutput.

func (*DebugMutator) Mkdir

func (m *DebugMutator) Mkdir(name string, perm os.FileMode) error

Mkdir implements Mutator.Mkdir.

func (*DebugMutator) RemoveAll

func (m *DebugMutator) RemoveAll(name string) error

RemoveAll implements Mutator.RemoveAll.

func (*DebugMutator) Rename

func (m *DebugMutator) Rename(oldpath, newpath string) error

Rename implements Mutator.Rename.

func (*DebugMutator) RunCmd

func (m *DebugMutator) RunCmd(cmd *exec.Cmd) error

RunCmd implements Mutator.RunCmd.

func (*DebugMutator) Stat

func (m *DebugMutator) Stat(name string) (os.FileInfo, error)

Stat implements Mutator.Stat.

func (*DebugMutator) WriteFile

func (m *DebugMutator) WriteFile(name string, data []byte, perm os.FileMode, currData []byte) error

WriteFile implements Mutator.WriteFile.

func (m *DebugMutator) WriteSymlink(oldname, newname string) error

WriteSymlink implements Mutator.WriteSymlink.

type Dir

type Dir struct {
	Exact   bool
	Perm    os.FileMode
	Entries map[string]Entry
	// contains filtered or unexported fields
}

A Dir represents the target state of a directory.

func (*Dir) AppendAllEntries added in v1.8.0

func (d *Dir) AppendAllEntries(allEntries []Entry) []Entry

AppendAllEntries appends all Entries in d to allEntries.

func (*Dir) Apply

func (d *Dir) Apply(fs vfs.FS, mutator Mutator, follow bool, applyOptions *ApplyOptions) error

Apply ensures that destDir in fs matches d.

func (*Dir) ConcreteValue

func (d *Dir) ConcreteValue(ignore func(string) bool, sourceDir string, umask os.FileMode, recursive bool) (interface{}, error)

ConcreteValue implements Entry.ConcreteValue.

func (*Dir) Evaluate

func (d *Dir) Evaluate(ignore func(string) bool) error

Evaluate evaluates all entries in d.

func (*Dir) Private

func (d *Dir) Private() bool

Private returns true if d is private.

func (*Dir) SourceName

func (d *Dir) SourceName() string

SourceName implements Entry.SourceName.

func (*Dir) TargetName

func (d *Dir) TargetName() string

TargetName implements Entry.TargetName.

type DirAttributes

type DirAttributes struct {
	Name  string
	Exact bool
	Perm  os.FileMode
}

DirAttributes holds attributes parsed from a source directory name.

func ParseDirAttributes

func ParseDirAttributes(sourceName string) DirAttributes

ParseDirAttributes parses a single directory name.

func (DirAttributes) SourceName

func (da DirAttributes) SourceName() string

SourceName returns da's source name.

type Entry

type Entry interface {
	AppendAllEntries(allEntries []Entry) []Entry
	Apply(fs vfs.FS, mutator Mutator, follow bool, applyOptions *ApplyOptions) error
	ConcreteValue(ignore func(string) bool, sourceDir string, umask os.FileMode, recursive bool) (interface{}, error)
	Evaluate(ignore func(string) bool) error
	SourceName() string
	TargetName() string
	// contains filtered or unexported methods
}

An Entry is either a Dir, a File, or a Symlink.

type FSMutator

type FSMutator struct {
	vfs.FS
	// contains filtered or unexported fields
}

An FSMutator makes changes to a vfs.FS.

func NewFSMutator

func NewFSMutator(fs vfs.FS) *FSMutator

NewFSMutator returns an mutator that acts on fs.

func (*FSMutator) IdempotentCmdOutput

func (m *FSMutator) IdempotentCmdOutput(cmd *exec.Cmd) ([]byte, error)

IdempotentCmdOutput implements Mutator.IdempotentCmdOutput.

func (*FSMutator) RunCmd

func (m *FSMutator) RunCmd(cmd *exec.Cmd) error

RunCmd implements Mutator.RunCmd.

func (*FSMutator) WriteFile

func (m *FSMutator) WriteFile(name string, data []byte, perm os.FileMode, currData []byte) error

WriteFile implements Mutator.WriteFile.

func (m *FSMutator) WriteSymlink(oldname, newname string) error

WriteSymlink implements Mutator.WriteSymlink.

type File

type File struct {
	Empty     bool
	Encrypted bool
	Perm      os.FileMode
	Template  bool
	// contains filtered or unexported fields
}

A File represents the target state of a file.

func (*File) AppendAllEntries added in v1.8.0

func (f *File) AppendAllEntries(allEntries []Entry) []Entry

AppendAllEntries appends all f to allEntries.

func (*File) Apply

func (f *File) Apply(fs vfs.FS, mutator Mutator, follow bool, applyOptions *ApplyOptions) error

Apply ensures that the state of targetPath in fs matches f.

func (*File) ConcreteValue

func (f *File) ConcreteValue(ignore func(string) bool, sourceDir string, umask os.FileMode, recursive bool) (interface{}, error)

ConcreteValue implements Entry.ConcreteValue.

func (*File) Contents

func (f *File) Contents() ([]byte, error)

Contents returns f's contents.

func (*File) Evaluate

func (f *File) Evaluate(ignore func(string) bool) error

Evaluate evaluates f's contents.

func (*File) Executable

func (f *File) Executable() bool

Executable returns true is f is executable.

func (*File) Private

func (f *File) Private() bool

Private returns true if f is private.

func (*File) SourceName

func (f *File) SourceName() string

SourceName implements Entry.SourceName.

func (*File) TargetName

func (f *File) TargetName() string

TargetName implements Entry.TargetName.

type FileAttributes

type FileAttributes struct {
	Name      string
	Mode      os.FileMode
	Empty     bool
	Encrypted bool
	Template  bool
}

A FileAttributes holds attributes parsed from a source file name.

func ParseFileAttributes

func ParseFileAttributes(sourceName string) FileAttributes

ParseFileAttributes parses a source file name.

func (FileAttributes) SourceName

func (fa FileAttributes) SourceName() string

SourceName returns fa's source name.

type GPG

type GPG struct {
	Command   string
	Recipient string
	Symmetric bool
}

GPG interfaces with gpg.

func (*GPG) Decrypt

func (g *GPG) Decrypt(filename string, ciphertext []byte) ([]byte, error)

Decrypt decrypts ciphertext. filename is used as a hint for naming temporary files.

func (*GPG) Encrypt

func (g *GPG) Encrypt(filename string, plaintext []byte) ([]byte, error)

Encrypt encrypts plaintext for ts's recipient. filename is used as a hint for naming temporary files.

type GitDiffMutator added in v1.8.0

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

A GitDiffMutator wraps a Mutator and logs all of the actions it would execute as a git diff.

func NewGitDiffMutator added in v1.8.0

func NewGitDiffMutator(unifiedEncoder *diff.UnifiedEncoder, m Mutator, prefix string) *GitDiffMutator

NewGitDiffMutator returns a new GitDiffMutator.

func (*GitDiffMutator) Chmod added in v1.8.0

func (m *GitDiffMutator) Chmod(name string, mode os.FileMode) error

Chmod implements Mutator.Chmod.

func (*GitDiffMutator) IdempotentCmdOutput added in v1.8.0

func (m *GitDiffMutator) IdempotentCmdOutput(cmd *exec.Cmd) ([]byte, error)

IdempotentCmdOutput implements Mutator.IdempotentCmdOutput.

func (*GitDiffMutator) Mkdir added in v1.8.0

func (m *GitDiffMutator) Mkdir(name string, perm os.FileMode) error

Mkdir implements Mutator.Mkdir.

func (*GitDiffMutator) RemoveAll added in v1.8.0

func (m *GitDiffMutator) RemoveAll(name string) error

RemoveAll implements Mutator.RemoveAll.

func (*GitDiffMutator) Rename added in v1.8.0

func (m *GitDiffMutator) Rename(oldpath, newpath string) error

Rename implements Mutator.Rename.

func (*GitDiffMutator) RunCmd added in v1.8.0

func (m *GitDiffMutator) RunCmd(cmd *exec.Cmd) error

RunCmd implements Mutator.RunCmd.

func (*GitDiffMutator) Stat added in v1.8.0

func (m *GitDiffMutator) Stat(name string) (os.FileInfo, error)

Stat implements Mutator.Stat.

func (*GitDiffMutator) WriteFile added in v1.8.0

func (m *GitDiffMutator) WriteFile(filename string, data []byte, perm os.FileMode, currData []byte) error

WriteFile implements Mutator.WriteFile.

func (m *GitDiffMutator) WriteSymlink(oldname, newname string) error

WriteSymlink implements Mutator.WriteSymlink.

type ImportTAROptions

type ImportTAROptions struct {
	DestinationDir  string
	Exact           bool
	StripComponents int
}

An ImportTAROptions contains options for TargetState.ImportTAR.

type Mutator

type Mutator interface {
	Chmod(name string, mode os.FileMode) error
	IdempotentCmdOutput(cmd *exec.Cmd) ([]byte, error)
	Mkdir(name string, perm os.FileMode) error
	RemoveAll(name string) error
	Rename(oldpath, newpath string) error
	RunCmd(cmd *exec.Cmd) error
	Stat(name string) (os.FileInfo, error)
	WriteFile(filename string, data []byte, perm os.FileMode, currData []byte) error
	WriteSymlink(oldname, newname string) error
}

A Mutator makes changes.

type NullMutator

type NullMutator struct{}

NullMutator is an Mutator that does nothing.

func (NullMutator) Chmod

Chmod implements Mutator.Chmod.

func (NullMutator) IdempotentCmdOutput

func (NullMutator) IdempotentCmdOutput(cmd *exec.Cmd) ([]byte, error)

IdempotentCmdOutput implements Mutator.IdempotentCmdOutput.

func (NullMutator) Mkdir

Mkdir implements Mutator.Mkdir.

func (NullMutator) RemoveAll

func (NullMutator) RemoveAll(string) error

RemoveAll implements Mutator.RemoveAll.

func (NullMutator) Rename

func (NullMutator) Rename(string, string) error

Rename implements Mutator.Rename.

func (NullMutator) RunCmd

func (NullMutator) RunCmd(cmd *exec.Cmd) error

RunCmd implements Mutator.RunCmd.

func (NullMutator) Stat

func (NullMutator) Stat(path string) (os.FileInfo, error)

Stat implements Mutator.Stat.

func (NullMutator) WriteFile

func (NullMutator) WriteFile(string, []byte, os.FileMode, []byte) error

WriteFile implements Mutator.WriteFile.

func (NullMutator) WriteSymlink(string, string) error

WriteSymlink implements Mutator.WriteSymlink.

type PatternSet

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

An PatternSet is a set of patterns.

func NewPatternSet

func NewPatternSet() *PatternSet

NewPatternSet returns a new PatternSet.

func (*PatternSet) Add

func (ps *PatternSet) Add(pattern string, include bool) error

Add adds a pattern to ps.

func (*PatternSet) Match

func (ps *PatternSet) Match(name string) bool

Match returns if name matches any pattern in ps.

type PersistentState

type PersistentState interface {
	Close() error
	Delete(bucket, key []byte) error
	Get(bucket, key []byte) ([]byte, error)
	Set(bucket, key, value []byte) error
}

A PersistentState is an interface to a persistent state.

type PopulateOptions

type PopulateOptions struct {
	ExecuteTemplates bool
}

A PopulateOptions contains options for TargetState.Populate.

type Script

type Script struct {
	Once     bool
	Template bool
	// contains filtered or unexported fields
}

A Script represents a script to run.

func (*Script) AppendAllEntries added in v1.8.0

func (s *Script) AppendAllEntries(allEntries []Entry) []Entry

AppendAllEntries returns allEntries unchanged.

func (*Script) Apply

func (s *Script) Apply(fs vfs.FS, mutator Mutator, follow bool, applyOptions *ApplyOptions) error

Apply runs s.

func (*Script) ConcreteValue

func (s *Script) ConcreteValue(ignore func(string) bool, sourceDir string, umask os.FileMode, recursive bool) (interface{}, error)

ConcreteValue implements Entry.ConcreteValue.

func (*Script) Contents

func (s *Script) Contents() ([]byte, error)

Contents returns s's contents.

func (*Script) Evaluate

func (s *Script) Evaluate(ignore func(string) bool) error

Evaluate evaluates s's contents.

func (*Script) SourceName

func (s *Script) SourceName() string

SourceName implements Entry.SourceName.

func (*Script) TargetName

func (s *Script) TargetName() string

TargetName implements Entry.TargetName.

type ScriptAttributes

type ScriptAttributes struct {
	Name     string
	Once     bool
	Template bool
}

A ScriptAttributes holds attributes parsed from a source script name.

func ParseScriptAttributes

func ParseScriptAttributes(sourceName string) ScriptAttributes

ParseScriptAttributes parses a source script file name.

func (ScriptAttributes) SourceName

func (sa ScriptAttributes) SourceName() string

SourceName returns sa's source name.

type ScriptState

type ScriptState struct {
	Name       string    `json:"name"`
	ExecutedAt time.Time `json:"executedAt"`
}

A ScriptState represents the state of a script.

type Symlink struct {
	Template bool
	// contains filtered or unexported fields
}

A Symlink represents the target state of a symlink.

func (*Symlink) AppendAllEntries added in v1.8.0

func (s *Symlink) AppendAllEntries(allEntries []Entry) []Entry

AppendAllEntries appends all f to allEntries.

func (*Symlink) Apply

func (s *Symlink) Apply(fs vfs.FS, mutator Mutator, follow bool, applyOptions *ApplyOptions) error

Apply ensures that the state of s's target in fs matches s.

func (*Symlink) ConcreteValue

func (s *Symlink) ConcreteValue(ignore func(string) bool, sourceDir string, umask os.FileMode, recursive bool) (interface{}, error)

ConcreteValue implements Entry.ConcreteValue.

func (*Symlink) Evaluate

func (s *Symlink) Evaluate(ignore func(string) bool) error

Evaluate evaluates s's target.

func (*Symlink) Linkname

func (s *Symlink) Linkname() (string, error)

Linkname returns s's link name.

func (*Symlink) SourceName

func (s *Symlink) SourceName() string

SourceName implements Entry.SourceName.

func (*Symlink) TargetName

func (s *Symlink) TargetName() string

TargetName implements Entry.TargetName.

type TargetState

type TargetState struct {
	DestDir         string
	Entries         map[string]Entry
	GPG             *GPG
	MinVersion      *semver.Version
	SourceDir       string
	TargetIgnore    *PatternSet
	TargetRemove    *PatternSet
	TemplateData    map[string]interface{}
	TemplateFuncs   template.FuncMap
	TemplateOptions []string
	Templates       map[string]*template.Template
	Umask           os.FileMode
}

A TargetState represents the root target state.

func NewTargetState

func NewTargetState(options ...TargetStateOption) *TargetState

NewTargetState creates a new TargetState with the given options.

func (*TargetState) Add

func (ts *TargetState) Add(fs vfs.FS, addOptions AddOptions, targetPath string, info os.FileInfo, follow bool, mutator Mutator) error

Add adds a new target to ts.

func (*TargetState) AllEntries added in v1.8.0

func (ts *TargetState) AllEntries() []Entry

AllEntries returns all Entrys in ts.

func (*TargetState) Apply

func (ts *TargetState) Apply(fs vfs.FS, mutator Mutator, follow bool, applyOptions *ApplyOptions) error

Apply ensures that ts.DestDir in fs matches ts.

func (*TargetState) Archive

func (ts *TargetState) Archive(w *tar.Writer, umask os.FileMode) error

Archive writes ts to w.

func (*TargetState) ConcreteValue

func (ts *TargetState) ConcreteValue(recursive bool) (interface{}, error)

ConcreteValue returns a value suitable for serialization.

func (*TargetState) Evaluate

func (ts *TargetState) Evaluate() error

Evaluate evaluates all of the entries in ts.

func (*TargetState) ExecuteTemplateData added in v1.7.17

func (ts *TargetState) ExecuteTemplateData(name string, data []byte) ([]byte, error)

ExecuteTemplateData returns the result of executing template data.

func (*TargetState) Get

func (ts *TargetState) Get(fs vfs.Stater, target string) (Entry, error)

Get returns the state of the given target, or nil if no such target is found.

func (*TargetState) ImportTAR

func (ts *TargetState) ImportTAR(r *tar.Reader, importTAROptions ImportTAROptions, mutator Mutator) error

ImportTAR imports a tar archive.

func (*TargetState) Populate

func (ts *TargetState) Populate(fs vfs.FS, options *PopulateOptions) error

Populate walks fs from ts.SourceDir to populate ts.

type TargetStateOption added in v1.7.17

type TargetStateOption func(*TargetState)

A TargetStateOption sets an option on a TargeState.

func WithDestDir added in v1.7.17

func WithDestDir(destDir string) TargetStateOption

WithDestDir sets DestDir.

func WithEntries added in v1.7.17

func WithEntries(entries map[string]Entry) TargetStateOption

WithEntries sets the entries.

func WithGPG added in v1.7.17

func WithGPG(gpg *GPG) TargetStateOption

WithGPG sets the GPG options.

func WithMinVersion added in v1.7.17

func WithMinVersion(minVersion *semver.Version) TargetStateOption

WithMinVersion sets the minimum version.

func WithSourceDir added in v1.7.17

func WithSourceDir(sourceDir string) TargetStateOption

WithSourceDir sets the source directory.

func WithTargetIgnore added in v1.7.17

func WithTargetIgnore(targetIgnore *PatternSet) TargetStateOption

WithTargetIgnore sets the target patterns to ignore.

func WithTargetRemove added in v1.7.17

func WithTargetRemove(targetRemove *PatternSet) TargetStateOption

WithTargetRemove sets the target patterns to remove.

func WithTemplateData added in v1.7.17

func WithTemplateData(templateData map[string]interface{}) TargetStateOption

WithTemplateData sets the template data.

func WithTemplateFuncs added in v1.7.17

func WithTemplateFuncs(templateFuncs template.FuncMap) TargetStateOption

WithTemplateFuncs sets the template functions.

func WithTemplateOptions added in v1.7.17

func WithTemplateOptions(templateOptions []string) TargetStateOption

WithTemplateOptions sets the template functions.

func WithTemplates added in v1.7.17

func WithTemplates(templates map[string]*template.Template) TargetStateOption

WithTemplates sets the templates.

func WithUmask added in v1.7.17

func WithUmask(umask os.FileMode) TargetStateOption

WithUmask sets the umask.

type VerboseMutator

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

A VerboseMutator wraps an Mutator and logs all of the actions it executes and any errors as pseudo shell commands.

func NewVerboseMutator

func NewVerboseMutator(w io.Writer, m Mutator, colored bool, maxDiffDataSize int) *VerboseMutator

NewVerboseMutator returns a new VerboseMutator.

func (*VerboseMutator) Chmod

func (m *VerboseMutator) Chmod(name string, mode os.FileMode) error

Chmod implements Mutator.Chmod.

func (*VerboseMutator) IdempotentCmdOutput

func (m *VerboseMutator) IdempotentCmdOutput(cmd *exec.Cmd) ([]byte, error)

IdempotentCmdOutput implements Mutator.IdempotentCmdOutput.

func (*VerboseMutator) Mkdir

func (m *VerboseMutator) Mkdir(name string, perm os.FileMode) error

Mkdir implements Mutator.Mkdir.

func (*VerboseMutator) RemoveAll

func (m *VerboseMutator) RemoveAll(name string) error

RemoveAll implements Mutator.RemoveAll.

func (*VerboseMutator) Rename

func (m *VerboseMutator) Rename(oldpath, newpath string) error

Rename implements Mutator.Rename.

func (*VerboseMutator) RunCmd

func (m *VerboseMutator) RunCmd(cmd *exec.Cmd) error

RunCmd implements Mutator.RunCmd.

func (*VerboseMutator) Stat

func (m *VerboseMutator) Stat(name string) (os.FileInfo, error)

Stat implements Mutator.Stat.

func (*VerboseMutator) WriteFile

func (m *VerboseMutator) WriteFile(name string, data []byte, perm os.FileMode, currData []byte) error

WriteFile implements Mutator.WriteFile.

func (m *VerboseMutator) WriteSymlink(oldname, newname string) error

WriteSymlink implements Mutator.WriteSymlink.

Jump to

Keyboard shortcuts

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