package main import ( "bufio" "fmt" "os" "sort" ) import ( "meatballhat.com/algs4" ) func main() { whiteList, err := algs4.ReadInts(bufio.NewReader(os.Stdin)) sort.Ints(whiteList) if err != nil { fmt.Println("UGH: ", err) os.Exit(1) } fmt.Println("Sorted whitelist:") for i := range whiteList { fmt.Println(i) } }