io

package
v0.0.0-...-552dcf1 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2022 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateMemFs

func CreateMemFs() *afero.Afero

CreateMemFs - creates an in-memory Afero instance for testing

func CreateOsFs

func CreateOsFs() *afero.Afero

CreateOsFs - creates an OS Afero instance

Types

type Container

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

func NewContainer

func NewContainer(fs *afero.Afero, logger *Logger, styles *styles.Styles, gitAdapter GitAdapter) *Container

func (*Container) FileSystem

func (container *Container) FileSystem() *afero.Afero

func (*Container) GitAdapter

func (container *Container) GitAdapter() GitAdapter

func (*Container) Logger

func (container *Container) Logger() *Logger

func (*Container) Styles

func (container *Container) Styles() *styles.Styles

type GitAdapter

type GitAdapter interface {
	Clone(repo string, dir string) error
}

type GoGitAdapter

type GoGitAdapter struct{}

func NewGoGitAdapter

func NewGoGitAdapter() *GoGitAdapter

func (*GoGitAdapter) Clone

func (adapter *GoGitAdapter) Clone(url string, dir string) error

type Logger

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

func NewLogger

func NewLogger(out io.Writer, enableColors bool, debug bool) *Logger

func NewTestLogger

func NewTestLogger() (*Logger, *bytes.Buffer)

func (*Logger) Debug

func (logger *Logger) Debug(a ...interface{}) (n int, err error)

func (*Logger) Debugf

func (logger *Logger) Debugf(format string, a ...interface{}) (n int, err error)

func (*Logger) PrettyPrintDiff

func (logger *Logger) PrettyPrintDiff(patch string)

PrettyPrintDiff - prints a diff using syntax highlighting if bat is available

func (*Logger) PrintStatusErrors

func (logger *Logger) PrintStatusErrors(errors []string, firstLineOnly bool)

func (*Logger) Printf

func (logger *Logger) Printf(format string, a ...interface{}) (n int, err error)

func (*Logger) Printfln

func (logger *Logger) Printfln(format string, a ...interface{}) (n int, err error)

func (*Logger) Println

func (logger *Logger) Println(a ...interface{}) (n int, err error)

func (*Logger) Write

func (logger *Logger) Write(p []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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