revert

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConvertLog = "convertlog"

	ActionRemove = Action("rm")
	ActionMove   = Action("mv")
	ActionMkdir  = Action("mkdir")
	ActionDone   = Action("done")

	//For breaking things that can't be easily recovered from, say writing new spec
	ActionManual = Action("manual")

	//ActionManual marks backup files that can be cleaned up after conversion with --keep
	ActionCleanup = Action("cleanup")
)

Variables

View Source
var Log = logging.New(os.Stderr, "revert ", logging.LstdFlags)

Functions

func Revert

func Revert(repoPath string, force bool, fixSpec bool, cleanupMode bool) (err error)

Types

type Action

type Action string

func (Action) Line

func (a Action) Line(arg ...string) ([]byte, error)

type ActionLogger

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

func NewActionLogger

func NewActionLogger(repoPath string) (*ActionLogger, error)

NewActionLogger creates revert action logger which logs actions needed to revert conversion steps

func (*ActionLogger) Close

func (a *ActionLogger) Close()

func (*ActionLogger) CloseFinal

func (a *ActionLogger) CloseFinal() error

func (*ActionLogger) Log

func (a *ActionLogger) Log(action Action, params ...string) error

type Step

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

type Steps

type Steps []Step

Jump to

Keyboard shortcuts

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