bb/tool/sort/sort.go

18 lines
256 B
Go

package sort
import (
"fmt"
"os"
"sort"
"github.com/omnipunk/tk/input"
"github.com/omnipunk/cli/mtool"
)
func Run(flagSet *mtool.Flags) {
lines, _ := input.ReadAllLines(os.Stdin)
sort.Strings(lines)
for _, l := range lines {
fmt.Print(l)
}
}