Skip to content

Simplify get#99

Merged
boynux merged 2 commits intoboynux:masterfrom
dswarbrick:simplify-get
May 3, 2025
Merged

Simplify get#99
boynux merged 2 commits intoboynux:masterfrom
dswarbrick:simplify-get

Conversation

@dswarbrick
Copy link
Contributor

@dswarbrick dswarbrick commented Sep 16, 2024

Refactor and simplify the get() function, using some built-in types like http.Header to make the code clearer. Also check for errors when writing to net.Conn.

Change Headers string slice in struct members to a ProxyHeader string. This is only ever used for an optional PROXY protocol header, and was easy to confuse with HTTP headers.

Refactor and simplify the get() function, using some built-in types like
http.Header to make the code clearer. Also check for errors when writing
to net.Conn.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
The Headers slice is only ever used for an optional PROXY protocol
header, and was easy to confuse with HTTP headers.

Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
Copy link
Owner

@boynux boynux left a comment

Choose a reason for hiding this comment

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

Thanks for this clean up

@boynux boynux merged commit 1f5068a into boynux:master May 3, 2025
@dswarbrick dswarbrick deleted the simplify-get branch May 5, 2025 14:59
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.

2 participants