-
Notifications
You must be signed in to change notification settings - Fork 345
Start adding long help documentation strings #152
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #152 +/- ##
==========================================
+ Coverage 67.68% 67.73% +0.05%
==========================================
Files 73 73
Lines 3778 3778
==========================================
+ Hits 2557 2559 +2
+ Misses 882 881 -1
+ Partials 339 338 -1
Continue to review full report at Codecov.
|
Nice! Yea, let's take option (4) and add commits to this PR. Once we have all of the commands documented, we can land them all together. |
Can you make this the next thing you work on regarding Prototool if possible? It'd be cool to close this out :-) |
- add `wordWrapLength` const - indent `create` file example - reword init
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 fixed some nits, but looks fine, also agree with strategy for this diff :)
internal/cmd/templates.go
Outdated
@@ -161,6 +221,86 @@ var ( | |||
grpcCmdTemplate = &cmdTemplate{ | |||
Use: "grpc dirOrProtoFiles...", | |||
Short: "Call a gRPC endpoint. Be sure to set required flags address, method, and either data or stdin.", | |||
Long: `What this does behind the scenes: | |||
|
|||
- Compiles your Protobuf files with "protoc", generating a "FileDescriptorSet". |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this part may be unnecessary, describing a FileDescriptorSet
. What if we simplified it as:
This command compiles your proto files with "protoc", converts JSON input to binary
and converts the result from binary to JSON. All these steps take on the order of
milliseconds. For example, the overhead for a file with four dependencies is about
30ms, so there is little overhead for CLI calls to gRPC.
Commenting here to get both your thoughts, not sure if this is any clearer.
I'd like to merge this before doing #16 - can we do what we'd like and get this in? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made some changes, but I'm fine with it as is now.
Probably worth it for one of you two to do a quick skim.
It sounds like we want to merge this as is. I'm fine if we open up subsequent PRs to finish up the long help commands.
Why did you remove the description of what it does? I think users will want to know this @AlexAPB |
I got no response from my comment so I assumed you were fine with it :P I was primarily trying to remove discussing a It was a minor readability change, we can revert if you'd like, this has my stamp. |
Anything is fine. Ping @amckinney. |
Merging per email with @AlexAPB. |
This starts the work to add long documentation strings to commands. This does a few things:
Short
andLong
parameters by adding an extra newline.\-
them out to separate lines when displayed). All the long documentation strings look proper when I try them out.After this start, we can fill out the long documentation strings for other commands at will.
I'd recommend checking out this branch, doing
make install
, and then doingprototool help grpc, lint,compile,...
to see how this looks.@amckinney I know you have specific preferences for documentation, and it almost always just adds improvement, but my goal is to get this in as a start, and then iterate on the documentation. We can do one of a few things:
Or...
(4) would probably be my preferred mechanism, but anything is fine, what do you think?
Fixes #146.