From 78f7194d4167fedd0101b8e9308d02782fdb8ae0 Mon Sep 17 00:00:00 2001 From: Sam Dodrill Date: Sat, 21 Feb 2015 15:29:57 -0800 Subject: [PATCH] tools/migrate-7: die if conflicting options --- tools/migrate-7/main.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tools/migrate-7/main.go b/tools/migrate-7/main.go index 84dfc7d..151f99b 100644 --- a/tools/migrate-7/main.go +++ b/tools/migrate-7/main.go @@ -10,6 +10,8 @@ package main import ( "flag" + "fmt" + "os" ) var ( @@ -28,4 +30,11 @@ var ( func main() { flag.Parse() + + if *saveDataAction && *replayDataAction { + fmt.Println("Cannot choose both saving and replaying at the same time.\n") + + flag.Usage() + os.Exit(2) + } }