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 virtual server listens with makeHTTP(s)Listener functions #4693

Merged
merged 14 commits into from Nov 26, 2023

Conversation

j1m-ryan
Copy link
Member

@j1m-ryan j1m-ryan commented Nov 21, 2023

Proposed changes

This refactor moves listen logic from two go template files nginx.virtualserver.tmpl and nginx-plus.virtualserver.tmpl , to the template_helper.go file

It adds two functions to be used in these files, makeHTTPListener and makeHTTPSListener

#4234

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@j1m-ryan j1m-ryan requested a review from a team as a code owner November 21, 2023 17:56
Copy link

codecov bot commented Nov 21, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (40979b3) 51.92% compared to head (8c23ebf) 52.09%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4693      +/-   ##
==========================================
+ Coverage   51.92%   52.09%   +0.16%     
==========================================
  Files          59       59              
  Lines       16973    17033      +60     
==========================================
+ Hits         8813     8873      +60     
  Misses       7862     7862              
  Partials      298      298              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@jjngx jjngx left a comment

Choose a reason for hiding this comment

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

👍🏻 great to see template logic moved to tested functions! 🚀

@jjngx jjngx requested a review from a team November 24, 2023 13:29
@jjngx jjngx requested a review from a team November 24, 2023 16:11
@j1m-ryan j1m-ryan merged commit 6533296 into main Nov 26, 2023
62 checks passed
@j1m-ryan j1m-ryan deleted the refactor/make-listen-helper-function branch November 26, 2023 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done 🚀
Development

Successfully merging this pull request may close these issues.

None yet

3 participants