pseudomuto / protoc-gen-doc

Documentation generator plugin for Google Protocol Buffers
MIT License
2.64k stars 464 forks source link

Support for more filters #355

Closed lpabon closed 6 years ago

lpabon commented 6 years ago

Add support for github.com/Masterminds/sprig in texts to support more filters

lpabon commented 6 years ago

Not sure why one run of travis failed, but the 1.10.x didn't.

lpabon commented 6 years ago

I also added an IsMap boolean since maps are mistakenly (or rightly) interpreted as their generated counterpart of repeated { Key, Val }. Makes it easy for protos, but a pain for documentation since it looks weird.

lpabon commented 6 years ago

This is what I am using it for: https://github.com/libopenstorage/libopenstorage.github.io

pseudomuto commented 6 years ago

@lpabon are you still planning on adding some tests for the IsMap thing?

lpabon commented 6 years ago

@pseudomuto Yeah, sorry, just been busy. Let me see if I can get to this by either end of this week or early next week.

lpabon commented 6 years ago

Added unit tests and changed filter to sprig.HtmlFuncMap()

$ make test
ok      github.com/pseudomuto/protoc-gen-doc    0.024s  coverage: 88.0% of statements
ok      github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc (cached)        coverage: 83.9% of statements
lpabon commented 6 years ago

Looks like master has travis tests have some other race condition errors. AFAIK, not caused by this PR.

pseudomuto commented 6 years ago

Looks like master has travis tests have some other race condition errors.

I'll look into those errors, I agree it's not likely related to this PR. Thanks so much for getting this up!