-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,42 @@ | ||
package app | ||
|
||
import ( | ||
ucli "github.com/urfave/cli/v2" | ||
ucli "github.com/urfave/cli/v2" | ||
) | ||
|
||
func New() *ucli.App { | ||
app := &ucli.App{ | ||
Name: "github-stats", | ||
Version: "0.0.5", | ||
Usage: "Get the total visit stats of your GitHub repositories", | ||
UsageText: "github-stats [global options]", | ||
Authors: []*ucli.Author{ | ||
{Name: "Umut Işık", Email: "[email protected]"}, | ||
}, | ||
Flags: []ucli.Flag { | ||
&ucli.IntFlag{ | ||
Name: "day", | ||
Aliases: []string{"d"}, | ||
Usage: "The number of days from today to show the stats", | ||
Value: 0, | ||
}, | ||
&ucli.IntFlag{ | ||
Name: "show-details", | ||
Aliases: []string{"s"}, | ||
Usage: "Show detailed output or not. 0 to close. Default is 1", | ||
Value: 1, | ||
}, | ||
&ucli.StringFlag{ | ||
Name: "token", | ||
Aliases: []string{"t"}, | ||
Value: "", | ||
Usage: "Personal access token got from GitHub to use the API", | ||
Required: true, | ||
}, | ||
}, | ||
} | ||
app := &ucli.App{ | ||
Name: "github-stats", | ||
Version: "0.0.6", | ||
Usage: "Get the total visit stats of your GitHub repositories", | ||
UsageText: "github-stats [global options]", | ||
Authors: []*ucli.Author{ | ||
{Name: "Umut Işık", Email: "[email protected]"}, | ||
}, | ||
Flags: []ucli.Flag{ | ||
&ucli.IntFlag{ | ||
Name: "day", | ||
Aliases: []string{"d"}, | ||
Usage: "The number of days from today to show the stats", | ||
Value: 0, | ||
}, | ||
&ucli.IntFlag{ | ||
Name: "show-details", | ||
Aliases: []string{"s"}, | ||
Usage: "Show detailed output or not. 0 to close. Default is 1", | ||
Value: 1, | ||
}, | ||
&ucli.StringFlag{ | ||
Name: "token", | ||
Aliases: []string{"t"}, | ||
Value: "", | ||
Usage: "Personal access token got from GitHub to use the API", | ||
Required: true, | ||
}, | ||
}, | ||
} | ||
|
||
app.CustomAppHelpTemplate = ` | ||
app.CustomAppHelpTemplate = ` | ||
NAME: | ||
{{.Name}}{{if .Usage}} - {{.Usage}}{{end}} | ||
USAGE: | ||
|
@@ -56,5 +56,5 @@ COPYRIGHT: | |
` | ||
|
||
return app | ||
return app | ||
} |