Documentation
¶
Index ¶
Constants ¶
View Source
const ( ActionAdd ActionType = "add" ActionDelete ActionType = "delete" ActionUpdate ActionType = "update" ModeKeep string = "keep" ModeAdd string = "add" ModeDelete string = "delete" )
Variables ¶
View Source
var Prompt string
Functions ¶
func ApplyPatch ¶
func ApplyPatch(cc FileSystem, patchText string) (string, error)
Types ¶
type ActionType ¶
type ActionType string
--------------------------------------------------------------------------- //
Domain objects
--------------------------------------------------------------------------- //
type Commit ¶
type Commit struct {
Changes map[string]FileChange
}
type FileChange ¶
type FileChange struct {
Type ActionType
OldContent *string
NewContent *string
MovePath string
}
type FileSystem ¶
type Patch ¶
type Patch struct {
Actions map[string]*PatchAction
}
type PatchAction ¶
type PatchAction struct {
Type ActionType
NewFile *string
Chunks []Chunk
MovePath string
}
Click to show internal directories.
Click to hide internal directories.