geosite

package
v1.9.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: GPL-2.0 Imports: 7 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(code []Item) option.DefaultRule

func Merge

func Merge(rules []option.DefaultRule) option.DefaultRule

func Write

func Write(writer io.Writer, domains map[string][]Item) error

Types

type Item

type Item struct {
	Type  ItemType
	Value string
}

type ItemType

type ItemType = uint8
const (
	RuleTypeDomain ItemType = iota
	RuleTypeDomainSuffix
	RuleTypeDomainKeyword
	RuleTypeDomainRegex
)

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func Open

func Open(path string) (*Reader, []string, error)

func (*Reader) Read

func (r *Reader) Read(code string) ([]Item, error)

func (*Reader) Upstream

func (r *Reader) Upstream() any

Jump to

Keyboard shortcuts

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