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

Make apitodoc support Ptrs and update docs #288

Merged
merged 3 commits into from
Aug 25, 2022

Conversation

ronensc
Copy link
Collaborator

@ronensc ronensc commented Aug 17, 2022

This PR enhances the apitodoc script to parse struct pointers in the API such as in the following cases:

TLS *ClientTLS `yaml:"tls" json:"tls" doc:"TLS client configuration (optional)"`

TLS *PromTLSConf `yaml:"tls,omitempty" json:"tls,omitempty" doc:"TLS configuration for the prometheus endpoint"`

@@ -35,7 +35,7 @@ func iterate(output io.Writer, data interface{}, indent int) {
if dataType == reflect.Slice || dataType == reflect.Map {
Copy link
Collaborator

Choose a reason for hiding this comment

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

There are some commented out statements in this function (lines 33, 44). Should these be removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I didn't write them. But, it seems that line 33 is used in the commented out debug code in lines 36 and 41.
I don't see the point of line 44. I'll remove it.

@codecov-commenter
Copy link

codecov-commenter commented Aug 24, 2022

Codecov Report

Merging #288 (4d46467) into main (9b96359) will increase coverage by 0.05%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #288      +/-   ##
==========================================
+ Coverage   67.33%   67.39%   +0.05%     
==========================================
  Files          73       73              
  Lines        4271     4278       +7     
==========================================
+ Hits         2876     2883       +7     
  Misses       1212     1212              
  Partials      183      183              
Flag Coverage Δ
unittests 67.39% <100.00%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/apitodoc/main.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ronensc ronensc merged commit 009a086 into netobserv:main Aug 25, 2022
@ronensc ronensc deleted the apitodoc-ptr branch August 25, 2022 09:00
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.

3 participants