Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

Commit

Permalink
adds more descriptive usage text
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaun Newman committed Oct 21, 2018
1 parent 66bb713 commit 318445b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
lpass.csv
lpass.csv
bin
7 changes: 7 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -e

GOOS=darwin GOARCH=amd64 go build -o bin/lpass-auditor-osx
GOOS=windows GOARCH=amd64 go build -o bin/lpass-auditor.exe
GOOS=linux GOARCH=amd64 go build -o bin/lpass-auditor
11 changes: 10 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
package main

import (
"flag"
"fmt"
"os"

"github.com/scnewma/lpass-auditor/command"
)

func usage() {
fmt.Fprintf(flag.CommandLine.Output(), "Usage: %s /path/to/csv\n", os.Args[0])
flag.PrintDefaults()
}

func main() {
flag.Usage = usage
flag.Parse()

command := command.Audit{}

err := command.Execute(os.Args[1:])
err := command.Execute(flag.Args())
if err != nil {
fmt.Fprintf(os.Stderr, "error: %v", err)
os.Exit(1)
Expand Down

0 comments on commit 318445b

Please sign in to comment.