From 57678695c5adf17246792daf01051b347b83d586 Mon Sep 17 00:00:00 2001 From: Yuri Shkuro Date: Tue, 8 Nov 2016 16:23:22 -0500 Subject: [PATCH] Use md-to-godoc (#3) --- Makefile | 7 ++++++- README.md | 8 ++++++-- scripts/updateLicenses.sh | 1 - services/agent/README.md | 5 +++-- services/agent/doc.go | 12 ++++++++---- services/agent/md2doc.go | 26 ++++++++++++++++++++++++++ 6 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 services/agent/md2doc.go diff --git a/Makefile b/Makefile index 258d614172b..1fb664b6e72 100644 --- a/Makefile +++ b/Makefile @@ -26,8 +26,12 @@ COLORIZE=sed ''/PASS/s//$(PASS)/'' | sed ''/FAIL/s//$(FAIL)/'' .PHONY: test-and-lint test-and-lint: test fmt lint +.PHONY: go-gen +go-gen: + go generate ./... + .PHONY: test -test: +test: go-gen $(GOTEST) $(PACKAGES) | $(COLORIZE) .PHONY: fmt @@ -61,6 +65,7 @@ install_ci: install go get github.com/mattn/goveralls go get golang.org/x/tools/cmd/cover go get github.com/golang/lint/golint + go get github.com/sectioneight/md-to-godoc .PHONY: test_ci diff --git a/README.md b/README.md index 128923be488..406e9fc1856 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,17 @@ http://uber.github.io/jaeger/ +## Status + +We are in the process of moving Jaeger backend code from internal repositories to GitHub. + ## Contributing -See [CONTRIBUTING.md](./CONTRIBUTING.md). +See [CONTRIBUTING](./CONTRIBUTING.md). ## License -[The MIT License](./LICENSE) +[The MIT License](./LICENSE). [doc-img]: https://readthedocs.org/projects/jaeger/badge/?version=latest [doc]: http://jaeger.readthedocs.org/en/latest/ diff --git a/scripts/updateLicenses.sh b/scripts/updateLicenses.sh index 88aaa1bd037..210b596b994 100755 --- a/scripts/updateLicenses.sh +++ b/scripts/updateLicenses.sh @@ -1,6 +1,5 @@ #!/bin/bash set -e -#set -x python scripts/updateLicense.py $(go list -json $(glide nv) | jq -r '.Dir + "/" + (.GoFiles | .[])') diff --git a/services/agent/README.md b/services/agent/README.md index 5ce4ec7da81..bf1031f6b78 100644 --- a/services/agent/README.md +++ b/services/agent/README.md @@ -1,4 +1,5 @@ -Package agent implements `jaeger-agent` sidecar service. It is meant -to run on each host that runs the services instrumented with Jaeger. +# `jaeger-agent` sidecar service + +Agent is meant to run on each host that runs the services instrumented with Jaeger. Jaeger client libraries send tracing spans to `jaeger-agent`. The agent forwards the spans to `jaeger-collector` services for storing in the DB. diff --git a/services/agent/doc.go b/services/agent/doc.go index c781581da88..23abfb3d5ea 100644 --- a/services/agent/doc.go +++ b/services/agent/doc.go @@ -18,8 +18,12 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -// Package agent implements jaeger-agent sidecar service. It is meant -// to run on each host that runs the services instrumented with Jaeger. -// Jaeger client libraries send tracing spans to jaeger-agent. The agent -// forwards the spans to jaeger-collector services for storing in the DB. +/* +Package agent is the jaeger-agent sidecar service. + +Agent is meant to run on each host that runs the services instrumented with Jaeger. +Jaeger client libraries send tracing spans to jaeger-agent. The agent +forwards the spans to jaeger-collector services for storing in the DB. + +*/ package agent diff --git a/services/agent/md2doc.go b/services/agent/md2doc.go new file mode 100644 index 00000000000..2e3b8026f91 --- /dev/null +++ b/services/agent/md2doc.go @@ -0,0 +1,26 @@ +// Copyright (c) 2016 Uber Technologies, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. + +// This file only exists to generate doc.go from README.md + +//go:generate md-to-godoc +//go:generate python ../../scripts/updateLicense.py doc.go + +package agent