21 lines
248 B
Go
21 lines
248 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"os"
|
||
|
|
||
|
"mcquay.me/spider"
|
||
|
)
|
||
|
|
||
|
const usage = "lnks <url>"
|
||
|
|
||
|
func main() {
|
||
|
if len(os.Args) < 2 {
|
||
|
fmt.Fprintf(os.Stderr, "%s\n", usage)
|
||
|
os.Exit(1)
|
||
|
}
|
||
|
for _, l := range spider.URLs(os.Args[1]) {
|
||
|
fmt.Println(l)
|
||
|
}
|
||
|
}
|