From a08f2c1e5ef3d9fb864e1d8e0dcd3733be919ecf Mon Sep 17 00:00:00 2001 From: Paul Jolly Date: Tue, 10 Apr 2018 21:28:15 +0100 Subject: [PATCH] cmd/mdreplace: self-document usage in README --- _scripts/run_tests.sh | 13 +++++++------ cmd/mdreplace/README.md | 23 +++++++++++++++++++++++ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/_scripts/run_tests.sh b/_scripts/run_tests.sh index 9a5259f8..39c92b82 100755 --- a/_scripts/run_tests.sh +++ b/_scripts/run_tests.sh @@ -37,16 +37,17 @@ then export GOPROXY="file://$PWD" popd > /dev/null + + $go version + $go env + + # can potentially go when we get a resolution on + # https://github.com/golang/go/issues/24748 + echo "GOPROXY=\"${GOPROXY:-}\"" fi export PATH=$GOPATH/bin:$PATH -$go version -$go env - -# can potentially go when we get a resolution on -# https://github.com/golang/go/issues/24748 -echo "GOPROXY=\"${GOPROXY:-}\"" # get all packages that do not belong to a module that has its # own _scripts/run_tests.sh file diff --git a/cmd/mdreplace/README.md b/cmd/mdreplace/README.md index 422a6582..0c696060 100644 --- a/cmd/mdreplace/README.md +++ b/cmd/mdreplace/README.md @@ -40,6 +40,29 @@ hello world today _To see this in action, look at the [source of the `README.md`](https://raw.githubusercontent.com/myitcv/x/master/cmd/mdreplace/README.md) you are currently reading._ +### Usage + + +``` +Usage: + + mdreplace file1 file2 ... + mdreplace + +When called with no file arguments, mdreplace works with stdin + +Flags: + -h show usage information + -strip + whether to strip special comments from the file + -w whether to write back to input files (cannot be used when reading from stdin) + +``` + ### Code fences