summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-27 22:27:19 -0600
committerJeff Carr <[email protected]>2024-12-27 22:27:19 -0600
commita957c22f8b63f390fc4289b93a84e921e5c3d64d (patch)
treebd497bd3a6e409176cd1b6cc985ed996c7703c89 /main.go
parent8b3be0ab42e68ab0616ff6e461dbe8b582b12d21 (diff)
start work on an applyPatch()
Diffstat (limited to 'main.go')
-rw-r--r--main.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/main.go b/main.go
index 1c2db96..25e801e 100644
--- a/main.go
+++ b/main.go
@@ -76,6 +76,17 @@ func main() {
}
}
+ if argv.Apply != "" {
+ pset, err := readPatchFile(argv.Apply)
+ if err != nil {
+ badExit(err)
+ }
+ if err = applyPatches(pset); err == nil {
+ okExit("applied patch ok")
+ }
+ badExit(err)
+ }
+
if argv.Delete != "" {
me.forge.DeleteByGoPath(argv.Delete)
me.forge.SetConfigSave(true)