From 38b7860096b6aa7c7122c97132f00334a23b62d8 Mon Sep 17 00:00:00 2001 From: Qiang Huang Date: Thu, 14 Apr 2016 10:39:12 +0800 Subject: [PATCH 1/2] Fix example in schema README We should only download dependence without installing, otherwise we'll probably get error: go install: no install location for directory /home/qhuang/specs/schema outside GOPATH For more details see: go help gopath Signed-off-by: Qiang Huang --- schema/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/README.md b/schema/README.md index 592ba610e..db7bfb0db 100644 --- a/schema/README.md +++ b/schema/README.md @@ -20,7 +20,7 @@ There is also included a simple utility for facilitating validation of a ```bash export GOPATH=`mktemp -d` -go get ./... +go get -d ./... go build . rm -rf $GOPATH ``` From aaf05c4dc9aad0f295caa576e122e93627138fcf Mon Sep 17 00:00:00 2001 From: Qiang Huang Date: Thu, 14 Apr 2016 12:33:17 +0800 Subject: [PATCH 2/2] Modify README to keep consistency with Makefile Use the name `validate` instead of `schema` for the utility. Signed-off-by: Qiang Huang --- schema/Makefile | 1 + schema/README.md | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/schema/Makefile b/schema/Makefile index 5f0a4f683..3016fb889 100644 --- a/schema/Makefile +++ b/schema/Makefile @@ -11,5 +11,6 @@ fmt: for i in *.json ; do jq --indent 4 -M . "$${i}" > xx && cat xx > "$${i}" && rm xx ; done validate: validate.go + go get -d ./... go build ./validate.go diff --git a/schema/README.md b/schema/README.md index db7bfb0db..e81898a0c 100644 --- a/schema/README.md +++ b/schema/README.md @@ -21,12 +21,18 @@ There is also included a simple utility for facilitating validation of a ```bash export GOPATH=`mktemp -d` go get -d ./... -go build . +go build ./validate.go rm -rf $GOPATH ``` +Or you can just use make command to create the utility: + +```bash +make validate +``` + Then use it like: ```bash -./schema schema.json /config.json +./validate schema.json /config.json ```