Skip to content

Commit

Permalink
Do not use go generate to run md-to-godoc
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuri Shkuro committed Jan 3, 2017
1 parent 99e5c1f commit eed01fe
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2016 Uber Technologies, Inc.
Copyright (c) 2017 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
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ test-and-lint: test fmt lint
go-gen:
go generate $(PACKAGES)

.PHONY: md-to-godoc-gen
md-to-godoc-gen:
find . -name README.md -not -path "./vendor/*" -not -path "./_site/*" -not -path "./idl/*" \
| grep -v '^./README.md' \
| xargs -I% md-to-godoc -license -licenseFile LICENSE -input=%

.PHONY: clean
clean:
rm -rf cover.out cover.html lint.log fmt.log
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ See [CONTRIBUTING](./CONTRIBUTING.md).
[ci]: https://travis-ci.org/uber/jaeger
[cov-img]: https://coveralls.io/repos/uber/jaeger/badge.svg?branch=master
[cov]: https://coveralls.io/github/uber/jaeger?branch=master
[//]: # (md-to-godoc-ignore)

2 changes: 1 addition & 1 deletion pkg/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
`pkg/` is a collection of utility packages used by the Jaeger components without being specific to its internals.
Collection of utility packages used by the Jaeger components without being specific to its internals.

Utility packages are kept separate from the Jaeger core codebase to keep it as small and concise as possible. If some utilities grow larger and their APIs stabilize, they may be moved to their own repository, to facilitate re-use by other projects. However that is not the priority.

14 changes: 8 additions & 6 deletions services/agent/md2doc.go → pkg/doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// The MIT License (MIT)
//
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -18,9 +20,9 @@
// 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
// Package pkg is the Collection of utility packages used by the Jaeger components without being specific to its internals.
//
// Utility packages are kept separate from the Jaeger core codebase to keep it as small and concise as possible. If some utilities grow larger and their APIs stabilize, they may be moved to their own repository, to facilitate re-use by other projects. However that is not the priority.
//
//
package pkg
4 changes: 1 addition & 3 deletions services/agent/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# `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.
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.
8 changes: 3 additions & 5 deletions services/agent/doc.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// The MIT License (MIT)
//
// Copyright (c) 2017 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -20,11 +22,7 @@

// 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.
// 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

0 comments on commit eed01fe

Please sign in to comment.