refactor: move browser device options to pkg/uixt/option pkg

This commit is contained in:
lilong.129
2025-03-03 21:40:50 +08:00
parent 69d06a7215
commit b687abb3c8
4 changed files with 30 additions and 20 deletions

View File

@@ -0,0 +1,14 @@
package option
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
}
}