feat: add log

This commit is contained in:
余泓铮
2024-05-28 15:05:57 +08:00
parent 6ec9b4a9a6
commit 33fb463760
2 changed files with 4 additions and 3 deletions
+3 -3
View File
@@ -49,11 +49,11 @@ var listAppsCmd = &cobra.Command{
applicationType = gidevice.ApplicationTypeAny applicationType = gidevice.ApplicationTypeAny
} }
result, errList := device.InstallationProxyBrowse( result, err := device.InstallationProxyBrowse(
gidevice.WithApplicationType(applicationType), gidevice.WithApplicationType(applicationType),
gidevice.WithReturnAttributes("CFBundleVersion", "CFBundleDisplayName", "CFBundleIdentifier")) gidevice.WithReturnAttributes("CFBundleVersion", "CFBundleDisplayName", "CFBundleIdentifier"))
if errList != nil { if err != nil {
return fmt.Errorf("get app list failed") return fmt.Errorf("get app list failed %v", err)
} }
for _, app := range result { for _, app := range result {
+1
View File
@@ -390,6 +390,7 @@ type ExportPoint struct {
func ConvertPoints(lines []string) (eps []ExportPoint) { func ConvertPoints(lines []string) (eps []ExportPoint) {
log.Info().Msg("ConvertPoints") log.Info().Msg("ConvertPoints")
log.Info().Msg(strings.Join(lines, "\n"))
for _, line := range lines { for _, line := range lines {
if strings.Contains(line, "ext") { if strings.Contains(line, "ext") {
idx := strings.Index(line, "{") idx := strings.Index(line, "{")