summaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorGrégoire Duchêne <gduchene@awhk.org>2021-07-11 14:44:01 +0100
committerGrégoire Duchêne <gduchene@awhk.org>2021-07-11 14:44:01 +0100
commite26145a8c7427b6434d773020ef0f136de68ce98 (patch)
tree35f8931e9cf63557b318aa764f9f915e22c7cb47 /example
parent12482405856b9932efa2f91330fb7a8a2e4aa2d9 (diff)
Update example to check for ErrNoSDSupport
Diffstat (limited to 'example')
-rw-r--r--example/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/example/main.go b/example/main.go
index 2cfc85c..7b1bd93 100644
--- a/example/main.go
+++ b/example/main.go
@@ -28,7 +28,7 @@ func main() {
if !*useNames {
fds, err := gosdd.SDListenFDs(true)
- if err != nil {
+ if err != nil && err != gosdd.ErrNoSDSupport {
log.Fatalln(err)
}
log.Printf("Received %d file descriptors from systemd.", len(fds))