mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-16 11:37:36 +02:00
a3d3fe727d
* Made custom and random UA optional * Added pirvate context keys
23 lines
316 B
Go
23 lines
316 B
Go
package dynamic
|
|
|
|
type (
|
|
Options struct {
|
|
proxy string
|
|
userAgent string
|
|
}
|
|
|
|
Option func(opts *Options)
|
|
)
|
|
|
|
func WithProxy(address string) Option {
|
|
return func(opts *Options) {
|
|
opts.proxy = address
|
|
}
|
|
}
|
|
|
|
func WithUserAgent(value string) Option {
|
|
return func(opts *Options) {
|
|
opts.userAgent = value
|
|
}
|
|
}
|