mirror of
https://github.com/edoardottt/cariddi.git
synced 2026-09-14 05:37:44 +02:00
23 lines
344 B
Go
23 lines
344 B
Go
package input
|
|
|
|
import (
|
|
"bufio"
|
|
"os"
|
|
"strings"
|
|
)
|
|
|
|
//ScanInput return the array of elements
|
|
//taken as input on stdin.
|
|
func ScanInput() []string {
|
|
|
|
var result []string
|
|
|
|
// accept domains on stdin
|
|
sc := bufio.NewScanner(os.Stdin)
|
|
for sc.Scan() {
|
|
domain := strings.ToLower(sc.Text())
|
|
result = append(result, domain)
|
|
}
|
|
return result
|
|
}
|