Skip to content

Instantly share code, notes, and snippets.

@olehcambel
Last active May 15, 2020 20:16
Show Gist options
  • Save olehcambel/02997481fa53cdaf6c7e80d49746bf5e to your computer and use it in GitHub Desktop.
Save olehcambel/02997481fa53cdaf6c7e80d49746bf5e to your computer and use it in GitHub Desktop.
package main
import (
"bufio"
"fmt"
"log"
"os"
)
/*
list.txt
https://github.com/astaxie/beego
https://github.com/gobuffalo/buffalo
https://github.com/labstack/echo
https://github.com/gofiber/fiber
*/
func printDomain(d string) {
fmt.Println(d)
}
func main() {
fl, err := os.Open("list.txt")
if err != nil {
log.Fatal(err)
}
defer fl.Close()
scanner := bufio.NewScanner(fl)
for scanner.Scan() {
printDomain(scanner.Text())
}
if err := scanner.Err(); err != nil {
log.Fatal(err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment