tests: fix calling Fatal from non-main goroutine

This fixes warnings reported by govet and staticcheck linters:

    conn_test.go:659:2: SA2002: the goroutine calls T.Fatal, which must be called in the same goroutine as the test (staticcheck)
            go func() {
            ^
    conn_test.go:663:5: SA2002(related information): call to T.Fatal (staticcheck)
                                    b.Fatal(v.Err)
                                    ^
    server_interfaces_test.go:473:2: SA2002: the goroutine calls T.Fatal, which must be called in the same goroutine as the test (staticcheck)
            go func() {
            ^
    server_interfaces_test.go:476:4: SA2002(related information): call to T.Fatal (staticcheck)
                            t.Fatal(err)
                            ^
    [kir@kir-rhat dbus]$ golangci-lint run --disable-all -E  govet
    conn_test.go:663:5: testinggoroutine: call to (*B).Fatal from a non-test goroutine (govet)
                                    b.Fatal(v.Err)
                                    ^
    server_interfaces_test.go:476:4: testinggoroutine: call to (*T).Fatal from a non-test goroutine (govet)
                            t.Fatal(err)
                            ^

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2 files changed
tree: 0785f8473ae11f02deb2a8b333e3c52ef9d07a7e
  1. .github/
  2. _examples/
  3. introspect/
  4. prop/
  5. auth.go
  6. auth_anonymous.go
  7. auth_external.go
  8. auth_sha1.go
  9. call.go
  10. conn.go
  11. conn_darwin.go
  12. conn_other.go
  13. conn_test.go
  14. conn_unix.go
  15. conn_windows.go
  16. CONTRIBUTING.md
  17. dbus.go
  18. dbus_test.go
  19. decoder.go
  20. decoder_test.go
  21. default_handler.go
  22. doc.go
  23. encoder.go
  24. encoder_test.go
  25. escape.go
  26. escape_test.go
  27. examples_test.go
  28. exec_command_test.go
  29. export.go
  30. export_test.go
  31. go.mod
  32. go.sum
  33. homedir.go
  34. LICENSE
  35. MAINTAINERS
  36. match.go
  37. match_test.go
  38. message.go
  39. message_test.go
  40. object.go
  41. object_test.go
  42. proto_test.go
  43. README.md
  44. sequence.go
  45. sequence_test.go
  46. sequential_handler.go
  47. sequential_handler_test.go
  48. server_interfaces.go
  49. server_interfaces_test.go
  50. sig.go
  51. sig_test.go
  52. store_test.go
  53. transport_darwin.go
  54. transport_generic.go
  55. transport_nonce_tcp.go
  56. transport_nonce_tcp_test.go
  57. transport_tcp.go
  58. transport_tcp_test.go
  59. transport_unix.go
  60. transport_unix_test.go
  61. transport_unixcred_dragonfly.go
  62. transport_unixcred_freebsd.go
  63. transport_unixcred_linux.go
  64. transport_unixcred_netbsd.go
  65. transport_unixcred_openbsd.go
  66. transport_zos.go
  67. variant.go
  68. variant_lexer.go
  69. variant_parser.go
  70. variant_test.go
README.md

Build Status

dbus

dbus is a simple library that implements native Go client bindings for the D-Bus message bus system.

Features

  • Complete native implementation of the D-Bus message protocol
  • Go-like API (channels for signals / asynchronous method calls, Goroutine-safe connections)
  • Subpackages that help with the introspection / property interfaces

Installation

This packages requires Go 1.12 or later. It can be installed by running the command below:

go get github.com/godbus/dbus/v5

Usage

The complete package documentation and some simple examples are available at godoc.org. Also, the _examples directory gives a short overview over the basic usage.

Projects using godbus

  • fyne a cross platform GUI in Go inspired by Material Design.
  • fynedesk a full desktop environment for Linux/Unix using Fyne.
  • go-bluetooth provides a bluetooth client over bluez dbus API.
  • iwd go bindings for the internet wireless daemon “iwd”.
  • notify provides desktop notifications over dbus into a library.
  • playerbm a bookmark utility for media players.

Please note that the API is considered unstable for now and may change without further notice.

License

go.dbus is available under the Simplified BSD License; see LICENSE for the full text.

Nearly all of the credit for this library goes to github.com/guelfey/go.dbus.