Skip to content

Commit

Permalink
check errors in example
Browse files Browse the repository at this point in the history
  • Loading branch information
reujab committed Jun 16, 2021
1 parent 6ad6a79 commit b16dca6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
12 changes: 10 additions & 2 deletions example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ func main() {
}

fmt.Println("Current wallpaper:", background)
wallpaper.SetFromFile("/usr/share/backgrounds/gnome/adwaita-day.jpg")
wallpaper.SetFromURL("https://i.imgur.com/pIwrYeM.jpg")

err = wallpaper.SetFromFile("/usr/share/backgrounds/gnome/adwaita-day.jpg")
if err != nil {
panic(err)
}

err = wallpaper.SetFromURL("https://i.imgur.com/pIwrYeM.jpg")
if err != nil {
panic(err)
}
}
13 changes: 11 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,18 @@ func main() {
}

fmt.Println("Current wallpaper:", background)
wallpaper.SetFromFile("/usr/share/backgrounds/gnome/adwaita-day.jpg")
wallpaper.SetFromURL("https://i.imgur.com/pIwrYeM.jpg")

err = wallpaper.SetFromFile("/usr/share/backgrounds/gnome/adwaita-day.jpg")
if err != nil {
panic(err)
}

err = wallpaper.SetFromURL("https://i.imgur.com/pIwrYeM.jpg")
if err != nil {
panic(err)
}
}

```

## Supported desktops
Expand Down

0 comments on commit b16dca6

Please sign in to comment.