-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
33 lines (27 loc) · 694 Bytes
/
main.go
File metadata and controls
33 lines (27 loc) · 694 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import (
"fmt"
"os"
"github.com/kemokemo/gckdir/command"
"github.com/urfave/cli"
)
func main() {
os.Exit(run(os.Args))
}
func run(args []string) int {
app := cli.NewApp()
app.Name = Name
app.Version = fmt.Sprintf("%s.%s", Version, Revision)
app.Author = "kemokemo"
app.Email = "t2wonderland@gmail.com"
app.Usage = "generate a hash list of a correct directory and verify the target directory's structure and each hash value of files."
app.Flags = GlobalFlags
app.Commands = Commands
app.CommandNotFound = CommandNotFound
err := app.Run(args)
if err != nil {
fmt.Println("failed to run: ", err)
return command.ExitCodeFailed
}
return command.ExitCodeOK
}