bb/src/tool/sort/sort.go

19 lines
286 B
Go
Raw Normal View History

package sort
import (
"fmt"
"os"
"sort"
2023-06-26 12:16:52 +03:00
"github.com/mojosa-software/goblin/src/input"
"github.com/mojosa-software/gomtool/src/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)
}
}