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 getting various sub options into helper methods #178

Merged
merged 3 commits into from
Sep 29, 2021

Conversation

kylehodgetts
Copy link
Contributor

This PR resolves #177

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

dobegor
dobegor previously approved these changes Sep 29, 2021
type TimeoutOptions struct {
// RequestTimeout is total request timeout
RequestTimeout uint32 `yaml:"request_timeout,omitempty" json:"request_timeout,omitempty"`
// IdleTimeout is timeout for idle connection
IdleTimeout uint32 `yaml:"idle_timeout,omitempty" json:"idle_timeout,omitempty"`
}

func (o *Options) GetTimeoutOptions(path, method string) TimeoutOptions {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd use the same naming there as others, GetTimeoutOpts

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@kylehodgetts kylehodgetts merged commit b930751 into main Sep 29, 2021
@kylehodgetts kylehodgetts deleted the kylehodgetts/cleanup/generator-refactor branch September 29, 2021 10:44
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.

Refactor Generator code to be DRY and more concise
2 participants