mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-06 16:29:37 +08:00
refactor: rename options pkg to option
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
"github.com/httprunner/httprunner/v5/internal/sdk"
|
||||
"github.com/httprunner/httprunner/v5/pkg/uixt"
|
||||
"github.com/httprunner/httprunner/v5/pkg/uixt/options"
|
||||
"github.com/httprunner/httprunner/v5/pkg/uixt/option"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -36,7 +36,7 @@ var installCmd = &cobra.Command{
|
||||
return err
|
||||
}
|
||||
|
||||
device, err := uixt.NewAndroidDevice(options.WithSerialNumber(serial))
|
||||
device, err := uixt.NewAndroidDevice(option.WithSerialNumber(serial))
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return err
|
||||
@@ -48,9 +48,9 @@ var installCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
err = driverExt.Install(args[0],
|
||||
options.WithReinstall(replace),
|
||||
options.WithDowngrade(downgrade),
|
||||
options.WithGrantPermission(grant),
|
||||
option.WithReinstall(replace),
|
||||
option.WithDowngrade(downgrade),
|
||||
option.WithGrantPermission(grant),
|
||||
)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/httprunner/httprunner/v5/pkg/uixt"
|
||||
"github.com/httprunner/httprunner/v5/pkg/uixt/options"
|
||||
"github.com/httprunner/httprunner/v5/pkg/uixt/option"
|
||||
)
|
||||
|
||||
var iosRootCmd = &cobra.Command{
|
||||
@@ -13,7 +13,7 @@ var iosRootCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func getDevice(udid string) (*uixt.IOSDevice, error) {
|
||||
device, err := uixt.NewIOSDevice(options.WithUDID(udid))
|
||||
device, err := uixt.NewIOSDevice(option.WithUDID(udid))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
"github.com/httprunner/httprunner/v5/internal/sdk"
|
||||
"github.com/httprunner/httprunner/v5/pkg/uixt"
|
||||
"github.com/httprunner/httprunner/v5/pkg/uixt/options"
|
||||
"github.com/httprunner/httprunner/v5/pkg/uixt/option"
|
||||
)
|
||||
|
||||
var installCmd = &cobra.Command{
|
||||
@@ -30,7 +30,7 @@ var installCmd = &cobra.Command{
|
||||
return err
|
||||
}
|
||||
|
||||
device, err := uixt.NewIOSDevice(options.WithUDID(udid))
|
||||
device, err := uixt.NewIOSDevice(option.WithUDID(udid))
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return err
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
|
||||
"github.com/httprunner/httprunner/v5/internal/sdk"
|
||||
"github.com/httprunner/httprunner/v5/pkg/uixt"
|
||||
"github.com/httprunner/httprunner/v5/pkg/uixt/options"
|
||||
"github.com/httprunner/httprunner/v5/pkg/uixt/option"
|
||||
)
|
||||
|
||||
var uninstallCmd = &cobra.Command{
|
||||
@@ -34,7 +34,7 @@ var uninstallCmd = &cobra.Command{
|
||||
return err
|
||||
}
|
||||
|
||||
device, err := uixt.NewIOSDevice(options.WithUDID(udid))
|
||||
device, err := uixt.NewIOSDevice(option.WithUDID(udid))
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user