Skip to content

Commit 24a3c17

Browse files
committed
Removed context as a field within the nginx stream border client
This is a go anti-pattern
1 parent 81184f5 commit 24a3c17

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

internal/application/nginx_http_border_client.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
type NginxHTTPBorderClient struct {
1919
BorderClient
2020
nginxClient NginxClientInterface
21-
ctx context.Context
2221
}
2322

2423
// NewNginxHTTPBorderClient is the Factory function for creating an NewNginxHTTPBorderClient.
@@ -30,7 +29,6 @@ func NewNginxHTTPBorderClient(client interface{}) (Interface, error) {
3029

3130
return &NginxHTTPBorderClient{
3231
nginxClient: ngxClient,
33-
ctx: context.Background(),
3432
}, nil
3533
}
3634

internal/application/nginx_stream_border_client.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import (
1818
type NginxStreamBorderClient struct {
1919
BorderClient
2020
nginxClient NginxClientInterface
21-
ctx context.Context
2221
}
2322

2423
// NewNginxStreamBorderClient is the Factory function for creating an NginxStreamBorderClient.
@@ -30,7 +29,6 @@ func NewNginxStreamBorderClient(client interface{}) (Interface, error) {
3029

3130
return &NginxStreamBorderClient{
3231
nginxClient: ngxClient,
33-
ctx: context.Background(),
3432
}, nil
3533
}
3634

0 commit comments

Comments
 (0)