notary/gosumcheck: move notary/internal/notecheck to notary/gosumcheck

Part of preparing for this to be a tool people might run
as well as removing the uses of "notary".
(Still need to move the main directory.)

Change-Id: I41633acb3503e02c1f9460a8d2f3880265749849
Reviewed-on: https://go-review.googlesource.com/c/exp/+/172965
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Filippo Valsorda <filippo@golang.org>
diff --git a/notary/internal/notecheck/main.go b/notary/gosumcheck/main.go
similarity index 89%
rename from notary/internal/notecheck/main.go
rename to notary/gosumcheck/main.go
index f647b6a..dbb0b9e 100644
--- a/notary/internal/notecheck/main.go
+++ b/notary/gosumcheck/main.go
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// Notecheck checks a go.sum file against a notary.
+// Gosumcheck checks a go.sum file against a go.sum database server.
 //
 // WARNING! This program is meant as a proof of concept demo and
 // should not be used in production scripts.
@@ -12,7 +12,7 @@
 //
 // Usage:
 //
-//	notecheck [-h H] [-k key] [-u url] [-v] go.sum
+//	gosumcheck [-h H] [-k key] [-u url] [-v] go.sum
 //
 // The -h flag changes the tile height (default 8).
 //
@@ -21,8 +21,8 @@
 // The -u flag overrides the URL of the server.
 //
 // The -v flag enables verbose output.
-// In particular, it causes notecheck to print all URLs fetched
-// from the server and how long each took.
+// In particular, it causes gosumcheck to report
+// the URL and elapsed time for each server request.
 //
 package main
 
@@ -42,14 +42,14 @@
 )
 
 func usage() {
-	fmt.Fprintf(os.Stderr, "usage: notecheck [-h H] [-k notary-key] [-u url] [-v] go.sum...\n")
+	fmt.Fprintf(os.Stderr, "usage: gosumcheck [-h H] [-k key] [-u url] [-v] go.sum...\n")
 	os.Exit(2)
 }
 
 var (
 	height = flag.Int("h", 8, "tile height")
-	vkey   = flag.String("k", "rsc-goog.appspot.com+eecb1dec+AbTy1QXWdqYd1TTpuaUqsk6u7p+n4AqLiLB8SBwoB831", "notary key") // TODO: Replace with real key.
-	url    = flag.String("u", "", "url to notary (overriding name)")
+	vkey   = flag.String("k", "rsc-goog.appspot.com+eecb1dec+AbTy1QXWdqYd1TTpuaUqsk6u7p+n4AqLiLB8SBwoB831", "key") // TODO: Replace with real key.
+	url    = flag.String("u", "", "url to server (overriding name)")
 	vflag  = flag.Bool("v", false, "enable verbose output")
 )
 
diff --git a/notary/gosumcheck/test.bash b/notary/gosumcheck/test.bash
new file mode 100755
index 0000000..bff14b0
--- /dev/null
+++ b/notary/gosumcheck/test.bash
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+set -e
+go build -o gosumcheck.exe
+./gosumcheck.exe "$@" -v test.sum
+rm -f ./gosumcheck.exe
diff --git a/notary/internal/notecheck/test.sum b/notary/gosumcheck/test.sum
similarity index 100%
rename from notary/internal/notecheck/test.sum
rename to notary/gosumcheck/test.sum
diff --git a/notary/internal/notecheck/test.bash b/notary/internal/notecheck/test.bash
deleted file mode 100755
index d1944a7..0000000
--- a/notary/internal/notecheck/test.bash
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/bash
-
-set -e
-go build -o notecheck.exe
-./notecheck.exe "$@" -v rsc-goog.appspot.com+eecb1dec+AbTy1QXWdqYd1TTpuaUqsk6u7p+n4AqLiLB8SBwoB831 test.sum
-rm -f ./notecheck.exe