amenzhinsky / dbus-codegen-go

D-Bus code-generation for golang
MIT License
16 stars 14 forks source link

Instructions in README.md not working as expected #3

Closed nandhithakamal closed 3 years ago

nandhithakamal commented 3 years ago

I followed the instructions in _examples/object_manager_client/README.md I get the following error when running go run . -system -dest=org.bluez

flag provided but not defined: -dest
Usage: /tmp/go-build969739744/b001/exe/client [option...] DESTINATION

Options:
  -path path
        bus object path (default "/")
  -system
        connect to the session bus
exit status 2

I generated the client file by running - dbus-codegen-go -package=main -prefix=org.freedesktop.DBus -camelize -output=client.go -client-only om.xml

Am I doing something wrong here?

nandhithakamal commented 3 years ago

go run . -system org.bluez works for me.

I can raise a PR to update the readme.

amenzhinsky commented 3 years ago

Hi @nandhithakamal , it seems you're using an outdated version, the usage message you're getting doesn't correspond to what's in master right now:

https://github.com/amenzhinsky/dbus-codegen-go/blob/master/main.go#L38

Can you pull latest changes and try again?