mirror of
https://github.com/Yuyi-Oak/BlueArchiveToolkit.git
synced 2026-09-18 10:04:55 +08:00
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
)
|
||||
|
||||
func runSync(args []string) error {
|
||||
if len(args) < 2 || args[0] != "plan" {
|
||||
return fmt.Errorf("usage: bat sync plan <current-json> [previous-json]")
|
||||
}
|
||||
|
||||
current := args[1]
|
||||
previous := ""
|
||||
if len(args) > 2 {
|
||||
previous = args[2]
|
||||
}
|
||||
|
||||
result, err := BuildSyncPlan(current, previous)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Fprintln(os.Stdout, result)
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user