-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
👔 up(cli/cmdline): use strings.Builder refactor the cmdline.Builder l…
…ogic - add more tests
- Loading branch information
Showing
3 changed files
with
49 additions
and
43 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
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
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,2 +1,12 @@ | ||
// Package cmdline provide quick build and parse cmd line string. | ||
package cmdline | ||
|
||
// LineBuild build command line string by given args. | ||
func LineBuild(binFile string, args []string) string { | ||
return NewBuilder(binFile, args...).String() | ||
} | ||
|
||
// ParseLine input command line text. alias of the StringToOSArgs() | ||
func ParseLine(line string) []string { | ||
return NewParser(line).Parse() | ||
} |