electricbubble / gidevice

communicate with iOS devices implemented with Golang
MIT License
274 stars 68 forks source link

update_version_compare #17

Closed ZhouYixun closed 2 years ago

ZhouYixun commented 2 years ago

1、update the way for version compare. 2、change iOSVeriosn type 3、add go.mod dependency

electricbubble commented 2 years ago

待讨论引入第三方库的必要性


现阶段 func DeviceVersion 能提供基本的版本比较功能

但使用上确实不那么方便

但可以将现在的 version []int 包装成一个 struct

并提供类似 version.LessThan(semver.MustParse("11.0")method

同样可以达到类似的便捷性

ZhouYixun commented 2 years ago

1、remove third dependency 2、go mod tidy

electricbubble commented 2 years ago

有进行过测试?

执行单元测试时报错

package github.com/electricbubble/gidevice
    imports github.com/electricbubble/gidevice/pkg/libimobiledevice
    imports github.com/electricbubble/gidevice: import cycle not allowed
ZhouYixun commented 2 years ago

Ok, Thanks!