Skip to content

Commit

Permalink
added missing command short descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianrudnik committed Apr 3, 2019
1 parent 3908c55 commit a381d02
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions cmd/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

var parseCmd = &cobra.Command{
Use: "parse",
Short: "collection of commands that allow to parse and extract information",
Run: func(cmd *cobra.Command, args []string) {
_ = cmd.Help()
},
Expand Down Expand Up @@ -57,6 +58,7 @@ func doJson(cmd *cobra.Command, data interface{}) error {

var parseUriCmd = &cobra.Command{
Use: "uri",
Short: "parses the given uri into single parts and returns them as json or formatted template",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
parsed, err := url.Parse(args[0])
Expand Down Expand Up @@ -87,6 +89,7 @@ var parseUriCmd = &cobra.Command{

var parseQueryCmd = &cobra.Command{
Use: "query",
Short: "parses the given query string and returns them as json or formatted template",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
_, err := url.ParseQuery(args[0])
Expand Down
3 changes: 3 additions & 0 deletions cmd/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ import (

var pathCmd = &cobra.Command{
Use: "path",
Short: "collection of commands to modify path related information",
Run: func(cmd *cobra.Command, args []string) {
_ = cmd.Help()
},
}

var pathEscapeCmd = &cobra.Command{
Use: "escape",
Short: "escapes the given path value and returns the escaped version",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
out := url.PathEscape(args[0])
Expand All @@ -23,6 +25,7 @@ var pathEscapeCmd = &cobra.Command{

var pathUnescapeCmd = &cobra.Command{
Use: "unescape",
Short: "unescapes the given escaped value and returns the original path value",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
out, err := url.PathUnescape(args[0])
Expand Down
1 change: 1 addition & 0 deletions cmd/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (

var queryCmd = &cobra.Command{
Use: "query",
Short: "collection of commands to modify query related information",
Run: func(cmd *cobra.Command, args []string) {
_ = cmd.Help()
},
Expand Down
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func output(cmd *cobra.Command, val string) {

var rootCmd = &cobra.Command{
Use: "uritool",
Short: "uritool is a helper command to process uris on the command line",
Short: "process uris and extract information",
Run: func(cmd *cobra.Command, args []string) {
_ = cmd.Help()
},
Expand All @@ -95,6 +95,6 @@ var versionCmd = &cobra.Command{
Use: "version",
Short: "prints the current version",
Run: func(cmd *cobra.Command, args []string) {
output(cmd, "1.0.0")
output(cmd, Version)
},
}

0 comments on commit a381d02

Please sign in to comment.