Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor commands descriptions #1585

Merged
merged 1 commit into from
Jun 5, 2019

Conversation

pavolloffay
Copy link
Member

Signed-off-by: Pavol Loffay [email protected]

Run: func(cmd *cobra.Command, args []string) {
fmt.Fprintln(cmd.OutOrStdout(), `
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to make this available in generated docs. Now it is printed when env command is run but also included in generated docs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you have an example of the output you could paste?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The output is the same as before, Just removed spaces at the beginning.

@@ -47,9 +47,9 @@ func main() {

v := viper.New()
command := &cobra.Command{
Use: "(experimental) jaeger-ingester",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The use should not include spaces otherwise generated files look like:

(experimental).md
(experimental)_docs.md
(experimental)_env.md
(experimental)_version.md

@codecov
Copy link

codecov bot commented Jun 5, 2019

Codecov Report

Merging #1585 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1585      +/-   ##
=========================================
- Coverage    98.8%   98.8%   -0.01%     
=========================================
  Files         191     191              
  Lines        9102    9095       -7     
=========================================
- Hits         8993    8986       -7     
  Misses         85      85              
  Partials       24      24
Impacted Files Coverage Δ
cmd/env/command.go 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d994244...c12d7b4. Read the comment docs.

@@ -89,7 +89,7 @@ func main() {
Use: "jaeger-all-in-one",
Short: "Jaeger all-in-one distribution with agent, collector and query in one process.",
Long: `Jaeger all-in-one distribution with agent, collector and query. Use with caution this version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"caution as this"
Does it need to be broken into 2 lines?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a preference to break lines longer than 100 chars.

Run: func(cmd *cobra.Command, args []string) {
fmt.Fprintln(cmd.OutOrStdout(), `
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you have an example of the output you could paste?

@pavolloffay
Copy link
Member Author

pavolloffay commented Jun 5, 2019

@objectiser the current output:

 go run -tags ui ./cmd/ingester/main.go  env                                                                                                                        4:09 
2019/06/05 16:10:01 maxprocs: Leaving GOMAXPROCS=8: CPU quota undefined

All command line options can be provided via environment variables by converting
their names to upper case and replacing punctuation with underscores. For example:

command line option                 environment variable
------------------------------------------------------------------
--cassandra.connections-per-host    CASSANDRA_CONNECTIONS_PER_HOST
--metrics-backend                   METRICS_BACKEND

The following configuration options are only available via environment variables:
SPAN_STORAGE_TYPE string         The type of backend [cassandra elasticsearch memory kafka badger grpc-plugin] used for trace storage. Multiple backends can be specified (currently only for writing spans) as comma-separated list, e.g. "cassandra,kafka". (default "cassandra")
DEPENDENCY_STORAGE_TYPE string   The type of backend used for service dependencies storage. (default "${SPAN_STORAGE}")


@pavolloffay pavolloffay merged commit 09dad38 into jaegertracing:master Jun 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants