Documentation
¶
Overview ¶
Package robots implements a robots.txt parser for the robots exclusion protocol.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Group ¶
Group stores a group found in a robots.txt file. This type is only used during parsing.
func (*Group) HasMembers ¶
HasMembers returns true if the group has one or more of the following members: allow, disallow and crawl-delay.
func (*Group) HasUserAgents ¶
HasUserAgents returns true if the group has one or more user-agents.
type Groups ¶
type Groups []*Group
Groups contain all groups found in a robots.txt file. This type is only used during parsing.
type Robots ¶
Robots stores all relevant rules for a predefined user-agent.
type Rule ¶
type Rule struct {
Type RuleType
Length int
Equals string // Matches the whole path.
Prefix string // Matches the start of a path.
Suffix string // Matches the end of a path.
Needles []string // Matches anything inside a path.
}
Rule stores a parsed allow/disallow record found in the robots.txt file.
Click to show internal directories.
Click to hide internal directories.