You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
grawlCmd.Flags().Int64VarP(&grawlFlags.FlagDelay, flagNameDelay, "d", 0, "Delay between requests in milliseconds. (default 0)")
49
+
bindViperFlag(flagNameDelay)
29
50
30
-
grawlCmd.Flags().Int64Var(&grawlFlags.FlagRandomDelay, "random-delay", 0, "Max random delay between requests in milliseconds. (default 0 for no random delay)")
grawlCmd.Flags().Int64Var(&grawlFlags.FlagRandomDelay, flagNameRandomDelay, 0, "Max random delay between requests in milliseconds. (default 0 for no random delay)")
52
+
bindViperFlag(flagNameRandomDelay)
32
53
33
-
grawlCmd.Flags().IntVarP(&grawlFlags.FlagMaxDepth, "max-depth", "m", 0, "Set it to 0 for infinite recursion. (default 0)")
grawlCmd.Flags().IntVarP(&grawlFlags.FlagParallel, flagNameParallel, "l", 1, "Number of parallel requests.")
61
+
bindViperFlag(flagNameParallel)
41
62
42
-
grawlCmd.Flags().StringVarP(&grawlFlags.FlagUsername, "username", "u", "", "Use this for HTTP Basic Authentication. If you omit the password-flag a prompt will ask for the password.")
grawlCmd.Flags().StringVarP(&grawlFlags.FlagUsername, flagNameUsername, "u", "", "Use this for HTTP Basic Authentication. If you omit the password-flag a prompt will ask for the password.")
64
+
bindViperFlag(flagNameUsername)
44
65
45
-
grawlCmd.Flags().StringVarP(&grawlFlags.FlagPassword, "password", "p", "", "Use this for HTTP Basic Authentication.")
grawlCmd.Flags().StringVar(&grawlFlags.FlagUserAgent, flagNameUserAgent, "grawler", "Sets the user agent.")
70
+
bindViperFlag(flagNameUserAgent)
50
71
51
-
grawlCmd.Flags().BoolVarP(&grawlFlags.FlagSitemap, "sitemap", "s", false, "Checks the sitemap. If this is flag is set the url parameter has to be the url to the sitemap.xml.")
grawlCmd.Flags().BoolVarP(&grawlFlags.FlagSitemap, flagNameSitemap, "s", false, "Checks the sitemap. If this is flag is set the url parameter has to be the url to the sitemap.xml.")
73
+
bindViperFlag(flagNameSitemap)
53
74
54
-
grawlCmd.Flags().StringSliceVarP(&grawlFlags.FlagAllowedDomains, "allowed-domains", "a", nil, "A comma separated list of allowed domains to be crawled. The domain of the given url is always allowed.")
grawlCmd.Flags().StringSliceVarP(&grawlFlags.FlagAllowedDomains, flagNameAllowedDomains, "a", nil, "A comma separated list of allowed domains to be crawled. The domain of the given url is always allowed.")
76
+
bindViperFlag(flagNameAllowedDomains)
56
77
57
-
grawlCmd.Flags().BoolVar(&grawlFlags.FlagRespectRobotsTxt, "respect-robots-txt", false, "Respect the robots.txt file.")
grawlCmd.Flags().StringVar(&grawlFlags.FlagPath, flagNamePath, "", "Restrict the crawlings on a certain url path.")
82
+
bindViperFlag(flagNamePath)
62
83
63
-
grawlCmd.Flags().BoolVarP(&grawlFlags.FlagCheckAll, "check-all", "", false, "In addtion to html and xml-urls, also check image, js and css-urls, among others.")
grawlCmd.Flags().BoolVarP(&grawlFlags.FlagCheckAll, flagNameCheckAll, "", false, "In addtion to html and xml-urls, also check image, js and css-urls, among others.")
85
+
bindViperFlag(flagNameCheckAll)
65
86
66
-
grawlCmd.Flags().Float32Var(&grawlFlags.FlagRequestTimeout, "request-timeout", 10, "Timeout in seconds to wait for a response.")
grawlCmd.Flags().StringSliceVar(&grawlFlags.FlagURLFilters, flagNameUrlFilters, nil, "Only visit urls that match the regular expressions given here.")
91
+
bindViperFlag(flagNameUrlFilters)
71
92
72
-
grawlCmd.Flags().StringSliceVar(&grawlFlags.FlagDisallowedURLFilters, "disallowed-url-filters", nil, "Do not visit urls that match the regular expressions given here.")
grawlCmd.Flags().StringSliceVar(&grawlFlags.FlagDisallowedURLFilters, flagNameDisallowedURLFilters, nil, "Do not visit urls that match the regular expressions given here.")
Copy file name to clipboardExpand all lines: cmd/init.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ var (
28
28
)
29
29
30
30
funcinit() {
31
-
initCmd.Flags().BoolVar(&initFlagUseHome, "home", false, fmt.Sprintf("If enabled it writes the config file to the path\"%s\"", configs.DefaultConfFile()))
31
+
initCmd.Flags().BoolVar(&initFlagUseHome, "home", false, fmt.Sprintf("If enabled the config file is written to\"%s\"", configs.DefaultConfFile()))
0 commit comments