Skip to content

Commit

Permalink
update --i to only -i and version info
Browse files Browse the repository at this point in the history
  • Loading branch information
hirenchauhan2 authored Jan 14, 2019
1 parent 11c2b96 commit b52e879
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ Wallpaper is a utility for setting the desktop wallpaper.
You can give the local filepath or any image url.
Usage:
wallpaper --file C:\Users\Hirenkumar.Chauhan\Pictures\made-a-botw-vector-wallpaper-4k-2560×1600.jpg
wallpaper -f C:\Users\your_user_name\Pictures\made-a-botw-vector-wallpaper-4k-2560×1600.jpg
wallpaper --i https://i.redd.it/l1764nd9h3721.jpg
wallpaper -i https://i.redd.it/l1764nd9h3721.jpg
--version, -v version of the utility.
--help, -h for help.
--file, -f [filepath] local filepath.
--i [url] download image from internet and set it as wallpaper
-i [url] download image from internet and set it as wallpaper
`)
}

Expand All @@ -30,16 +30,15 @@ func main() {

if len(args) >= 2 {
switch args[1] {
case "--file":
case "-f":
case "--file", "-f":
err = wallpaper.SetLocalWallpaper(args[2])
break
case "--i":
case "--i", "-i":
err = wallpaper.SetWallpaperFromURL(args[2])
break
case "--version":
case "-v":
fmt.Println("Wallpaper util version 0.1.0")
fmt.Println("Wallpaper util version 0.1.1")
break
case "--help":
case "-h":
Expand Down

0 comments on commit b52e879

Please sign in to comment.