diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2017-04-04 22:13:33 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2017-04-04 22:13:33 +0200 |
| commit | ba69181d4d892aecfc35f9f30fe190d946662284 (patch) | |
| tree | a278e13d433dc9ade4b19d0ef60a5a5528dbf4ba /util.go | |
| parent | 5169b2d145b0086516491a35887bfc5eb07be2ae (diff) | |
| download | gofu-ba69181d4d892aecfc35f9f30fe190d946662284.tar.gz | |
implement subcommands: remotes, repos, each
Diffstat (limited to 'util.go')
| -rw-r--r-- | util.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -22,9 +22,16 @@ import ( "bufio" "fmt" "os" + "sort" "strings" ) +//ShowSorted sorts the given lines and prints them on stdout. +func ShowSorted(lines []string) { + sort.Strings(lines) + fmt.Println(strings.Join(lines, "\n")) +} + //ShowError prints the given error on stderr if it is non-nil, or returns false otherwise. func ShowError(err error) bool { if err == nil { |
