Add documentation for platform options and expose to Godoc #266
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
KeyValue
's documentation says "See platform docs for more details.", but I didn't see any in Godoc.When looking through the source I found a helpful table, but it was not being exposed to the documentation generator.
Some of the platform specific options were missing as well.
I moved the table so that godoc associates it with
KeyValue
, and filled in the platform blanks I found.(I think it's all of them, but I'm not positive)
In addition, I noticed
UserService
is checked on more platforms than just OS X. So I moved it to the POSIX section.I considered moving some of the POSIX options out to the Linux section since they're only checked there, but figured platform support may be added for them later. So I kept them as is.
There's also some minor linter complaints addressed in the comments like adding periods, and a small spelling correction.
These can be split out or removed from the patch if desired.
This is how things are rendering for my local instance:
compared to the current release:
https://pkg.go.dev/github.com/kardianos/service@v1.2.0#Config
+
https://pkg.go.dev/github.com/kardianos/service@v1.2.0#KeyValue