RobotsTxtParser

package module
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 3 Imported by: 1

README

robotstxt-parser

A Robots.Txt Parser available as Golang Module

Features

  • Different parsing of Robots.txt (from Ua to UA and Sitemap separate)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KV

type KV struct {
	Key   string
	Value string
}

type RobotsTxt

type RobotsTxt struct {
	UserAgentRules []UserAgentRule `json:"user-agent-rules"`
	Sitemaps       []string        `json:"sitemaps"`
}

func ParseTxt

func ParseTxt(txt string) (RobotsTxt, error)

type UserAgentRule

type UserAgentRule struct {
	UserAgents []string `json:"user-agents"`
	Allow      []string `json:"allow"`
	Disallow   []string `json:"disallow"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL