-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat: listen on file descriptor #5973
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,8 @@ | |
import ( | ||
"fmt" | ||
"net" | ||
"os" | ||
"strconv" | ||
"syscall" | ||
) | ||
|
||
|
@@ -23,6 +25,11 @@ | |
|
||
return ln, err | ||
} | ||
if a.url.Scheme == AddressSchemeFileDescriptor { | ||
Check failure on line 28 in internal/configuration/schema/types_addresses_nix.go reviewdog / golangci[golangci] internal/configuration/schema/types_addresses_nix.go#L28
Raw output
|
||
fd := os.NewFile(uintptr(a.port), strconv.Itoa(a.port)) | ||
defer fd.Close() | ||
return net.FileListener(fd) | ||
Check failure on line 31 in internal/configuration/schema/types_addresses_nix.go reviewdog / golangci[golangci] internal/configuration/schema/types_addresses_nix.go#L31
Raw output
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 [golangci] reported by reviewdog 🐶 |
||
} | ||
|
||
return net.Listen(a.Network(), a.NetworkAddress()) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
if statements should only be cuddled with assignments (wsl)