A tool for crawling and finding links to URLs which no longer exist
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
488 B

package main
import (
"flag"
"strings"
)
// Created so that multiple inputs can be accecpted
type arrayFlags struct {
strs *[]string
}
func flagStrings(name, usage string) arrayFlags {
f := arrayFlags{new([]string)}
flag.Var(&f, name, usage)
return f
}
func (i arrayFlags) String() string {
if i.strs == nil {
return ""
}
return strings.Join(*i.strs, ", ")
}
func (i arrayFlags) Set(value string) error {
*i.strs = append(*i.strs, strings.TrimSpace(value))
return nil
}