Skip to content

Commit

Permalink
support custom self-port
Browse files Browse the repository at this point in the history
  • Loading branch information
harshavardhana committed Jul 27, 2023
1 parent d7707e8 commit 39a6127
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ var port = func() string {
}()

var selfDetectPort = func() string {
if sp := os.Getenv("HPERF_SELF_PORT"); sp != "" {
return sp
}
sp, err := strconv.Atoi(port)
if err != nil {
log.Fatal(err)
Expand Down

0 comments on commit 39a6127

Please sign in to comment.