bb/tool/sort/sort.go

19 lines
252 B
Go
Raw Normal View History

package sort
import (
"fmt"
"os"
"sort"
2023-10-23 14:57:57 +03:00
"github.com/reklesio/tk/input"
"github.com/reklesio/mtool"
)
2023-03-24 16:54:51 +03:00
func Run(flagSet *mtool.Flags) {
lines, _ := input.ReadAllLines(os.Stdin)
sort.Strings(lines)
for _, l := range lines {
fmt.Print(l)
}
}