Skip to content

Commit

Permalink
use local windowsupdate package in examples
Browse files Browse the repository at this point in the history
Signed-off-by: Zheng Dayu <davidzheng23@gmail.com>
  • Loading branch information
ceshihao committed Jul 8, 2022
1 parent a6bb9fd commit 94efa1c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 2 additions & 0 deletions examples/install_updates/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module github.com/ceshihao/windowsupdate/examples/install_updates

go 1.17

replace github.com/ceshihao/windowsupdate => ../../../windowsupdate

require (
github.com/ceshihao/windowsupdate v0.0.2
github.com/go-ole/go-ole v1.2.6
Expand Down
3 changes: 0 additions & 3 deletions examples/install_updates/go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
github.com/ceshihao/windowsupdate v0.0.2 h1:fdo2YfnncyRitcq0bEIPmKRNIqD4udHDuuXDh3ueGss=
github.com/ceshihao/windowsupdate v0.0.2/go.mod h1:ftABHPFeSH4MFoOCXgKxaw3YllfrTJ8zczyoqUxMZ4g=
github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/scjalliance/comshim v0.0.0-20190308082608-cf06d2532c4e h1:+/AzLkOdIXEPrAQtwAeWOBnPQ0BnYlBW0aCZmSb47u4=
Expand Down
2 changes: 2 additions & 0 deletions examples/query_update_history/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module github.com/ceshihao/windowsupdate/examples/query_update_history

go 1.17

replace github.com/ceshihao/windowsupdate => ../../../windowsupdate

require (
github.com/ceshihao/windowsupdate v0.0.2
github.com/go-ole/go-ole v1.2.6
Expand Down
3 changes: 0 additions & 3 deletions examples/query_update_history/go.sum
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
github.com/ceshihao/windowsupdate v0.0.2 h1:fdo2YfnncyRitcq0bEIPmKRNIqD4udHDuuXDh3ueGss=
github.com/ceshihao/windowsupdate v0.0.2/go.mod h1:ftABHPFeSH4MFoOCXgKxaw3YllfrTJ8zczyoqUxMZ4g=
github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/scjalliance/comshim v0.0.0-20190308082608-cf06d2532c4e h1:+/AzLkOdIXEPrAQtwAeWOBnPQ0BnYlBW0aCZmSb47u4=
Expand Down
3 changes: 2 additions & 1 deletion oleconv.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ func toTimeErr(result *ole.VARIANT, err error) (*time.Time, error) {
}

func variantToIDispatch(v *ole.VARIANT) *ole.IDispatch {
if v == nil {
value := v.Value()
if value == nil {
return nil
}
return v.ToIDispatch()
Expand Down

0 comments on commit 94efa1c

Please sign in to comment.