Last active
May 15, 2020 20:16
-
-
Save olehcambel/02997481fa53cdaf6c7e80d49746bf5e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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