refactor: move uixt pkg

This commit is contained in:
lilong.129
2025-03-05 11:04:02 +08:00
parent 9e064ee0ad
commit e107389d6e
122 changed files with 146 additions and 142 deletions
+22
View File
@@ -0,0 +1,22 @@
package option
func NewBrowserDeviceOptions(opts ...BrowserDeviceOption) *BrowserDeviceOptions {
config := &BrowserDeviceOptions{}
for _, opt := range opts {
opt(config)
}
return config
}
type BrowserDeviceOptions struct {
BrowserID string `json:"browser_id,omitempty" yaml:"browser_id,omitempty"`
LogOn bool `json:"log_on,omitempty" yaml:"log_on,omitempty"`
}
type BrowserDeviceOption func(*BrowserDeviceOptions)
func WithBrowserID(serial string) BrowserDeviceOption {
return func(device *BrowserDeviceOptions) {
device.BrowserID = serial
}
}