This commit is contained in:
@@ -88,7 +88,6 @@ type Client struct {
|
||||
wingbits Endpoint
|
||||
tar1090 *Endpoint
|
||||
http *http.Client
|
||||
streamBuf int
|
||||
userAgent string
|
||||
}
|
||||
|
||||
@@ -118,16 +117,6 @@ func WithHTTPClient(h *http.Client) Option {
|
||||
return func(c *Client) { c.http = h }
|
||||
}
|
||||
|
||||
// WithStreamBufferSize sets the buffer size of channels returned by the Stream*
|
||||
// methods. The default is 1.
|
||||
func WithStreamBufferSize(n int) Option {
|
||||
return func(c *Client) {
|
||||
if n >= 0 {
|
||||
c.streamBuf = n
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// WithUserAgent overrides the User-Agent header sent with requests.
|
||||
func WithUserAgent(ua string) Option {
|
||||
return func(c *Client) { c.userAgent = ua }
|
||||
@@ -137,7 +126,6 @@ func WithUserAgent(ua string) Option {
|
||||
// Host must be supplied via WithWingbitsEndpoint.
|
||||
func New(opts ...Option) (*Client, error) {
|
||||
c := &Client{
|
||||
streamBuf: 1,
|
||||
userAgent: "wingbits-go/1.0",
|
||||
}
|
||||
for _, opt := range opts {
|
||||
|
||||
Reference in New Issue
Block a user