Skip to content

Commit

Permalink
fix display of program name
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcormier committed Apr 2, 2015
1 parent aae2c53 commit 86c15a8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions setwp.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ import (
"github.com/docopt/docopt-go"
_ "github.com/mattn/go-sqlite3"
"log"
"os"
"os/exec"
"os/user"
"path/filepath"
)

const (
programName = "setwp"

dbRelativePath = "Library/Application Support/Dock/desktoppicture.db"
dbStatements = `
delete from data;
Expand All @@ -37,15 +38,15 @@ Options:
-v --version Show version information.
`
version = "%s version 0.1"
version = "%s version 0.1.1"
)

var positions = [...]string{"--fit", "--stretch", "--center", "--tile"}

func main() {
log.SetFlags(0)

args, err := docopt.Parse(fmt.Sprintf(usage, os.Args[0]), nil, true, fmt.Sprintf(version, os.Args[0]), false)
args, err := docopt.Parse(fmt.Sprintf(usage, programName), nil, true, fmt.Sprintf(version, programName), false)
if err != nil {
log.Fatalf("cannot parse arguments (%s)", err)
}
Expand Down

0 comments on commit 86c15a8

Please sign in to comment.