21 lines
309 B
Go
21 lines
309 B
Go
package sort
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
"sort"
|
|
"flag"
|
|
"github.com/k1574/goblin/m/input"
|
|
)
|
|
|
|
func Run(args []string) {
|
|
flagSet := flag.NewFlagSet(args[0], flag.ExitOnError)
|
|
flagSet.Parse(args[1:])
|
|
|
|
lines, _ := input.ReadAllLines(os.Stdin)
|
|
sort.Strings(lines)
|
|
for _, l := range lines {
|
|
fmt.Print(l)
|
|
}
|
|
|
|
}
|