bb/tool/sort/sort.go
2023-10-23 15:00:45 +03:00

18 lines
252 B
Go

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