From 3fbb8487e8b08adc7d71be70770486138ed2181e Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Sat, 17 Sep 2011 12:02:05 -0700 Subject: [PATCH] move some debug stuff out of camput into new camdebug Change-Id: I94c0451b7fabdccdcaff9ae3e5f4097bdb426b78 --- .last_go_version | 2 +- build.pl | 1 + clients/go/camdebug/.gitignore | 1 + clients/go/camdebug/camdebug.go | 35 +++++++++++++++++++++++ clients/go/{camput => camdebug}/splits.go | 0 clients/go/camput/camput.go | 7 ----- 6 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 clients/go/camdebug/.gitignore create mode 100644 clients/go/camdebug/camdebug.go rename clients/go/{camput => camdebug}/splits.go (100%) diff --git a/.last_go_version b/.last_go_version index d952dff08..4c92189c2 100644 --- a/.last_go_version +++ b/.last_go_version @@ -1 +1 @@ -6g version weekly.2011-09-16 9779 +6g version weekly.2011-09-16 9785+ diff --git a/build.pl b/build.pl index 974f74585..86dbded7f 100755 --- a/build.pl +++ b/build.pl @@ -627,6 +627,7 @@ sub generate_embed_file { __DATA__ TARGET: clients/go/camdbinit +TARGET: clients/go/camdebug TARGET: clients/go/camget TARGET: clients/go/camgsinit TARGET: clients/go/camput diff --git a/clients/go/camdebug/.gitignore b/clients/go/camdebug/.gitignore new file mode 100644 index 000000000..3f28c2514 --- /dev/null +++ b/clients/go/camdebug/.gitignore @@ -0,0 +1 @@ +camdebug diff --git a/clients/go/camdebug/camdebug.go b/clients/go/camdebug/camdebug.go new file mode 100644 index 000000000..3f196c905 --- /dev/null +++ b/clients/go/camdebug/camdebug.go @@ -0,0 +1,35 @@ +/* +Copyright 2011 Google Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + +import ( + "flag" + "log" +) + +var flagSplits = flag.Bool("splits", false, "show splits") + +func main() { + flag.Parse() + + if *flagSplits { + showSplits() + return + } + + log.Fatalf("TODO: usage info") +} diff --git a/clients/go/camput/splits.go b/clients/go/camdebug/splits.go similarity index 100% rename from clients/go/camput/splits.go rename to clients/go/camdebug/splits.go diff --git a/clients/go/camput/camput.go b/clients/go/camput/camput.go index 0d6cf83dd..6bc7b9645 100644 --- a/clients/go/camput/camput.go +++ b/clients/go/camput/camput.go @@ -47,8 +47,6 @@ var flagVerbose = flag.Bool("verbose", false, "be verbose") var flagSetAttr = flag.Bool("set-attr", false, "set (replace) an attribute") var flagAddAttr = flag.Bool("add-attr", false, "add an attribute, additional if one already exists") -var flagSplits = flag.Bool("debug-splits", false, "show splits") - var wereErrors = false type UploadCache interface { @@ -292,11 +290,6 @@ func main() { jsonsign.AddFlags() flag.Parse() - if *flagSplits { - showSplits() - return - } - nOpts := sumSet(flagFile, flagBlob, flagPermanode, flagInit, flagShare, flagRemove, flagSetAttr, flagAddAttr) if !(nOpts == 1 ||