Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Loyalsoldier/domain-list-custom
/ functions
Functions
30 in github.com/Loyalsoldier/domain-list-custom
⨍
Functions
30
◇
Types & classes
6
↓ 3 callers
Method
getChild
(s string)
trie.go:20
↓ 2 callers
Method
Marshal
Marshal processes a file in data directory and generates ListInfo for it.
listinfomap.go:17
↓ 2 callers
Function
isEmpty
isEmpty checks if the rule that has been trimmed out spaces is empty
common.go:102
↓ 2 callers
Function
newNode
()
trie.go:13
↓ 1 callers
Method
Flatten
Flatten flattens the rules in a file that have "include" syntax in data directory, and adds those need-to-included rules into it. This feature support
listinfo.go:202
↓ 1 callers
Method
FlattenAndGenUniqueDomainList
FlattenAndGenUniqueDomainList flattens the included lists and generates a domain trie for each file in data directory to make the items of domain type
listinfomap.go:38
↓ 1 callers
Function
GetDataDir
GetDataDir returns the path to the "data" directory used to generate lists. Usage order: 1. The datapath that user set when running the program 2. The
common.go:20
↓ 1 callers
Function
GetGOPATH
GetGOPATH returns GOPATH environment variable as a string. It will NOT be empty.
common.go:82
↓ 1 callers
Function
GetRuntimeEnv
GetRuntimeEnv returns the value of runtime environment variable, that is set by running following command: `go env -w key=value`.
common.go:56
↓ 1 callers
Method
Insert
Insert inserts a domain rule string into the domain trie and return whether is inserted successfully or not.
trie.go:50
↓ 1 callers
Function
NewDomainTrie
NewDomainTrie creates and returns a new domain trie.
trie.go:42
↓ 1 callers
Function
NewListInfo
NewListInfo return a ListInfo
listinfo.go:33
↓ 1 callers
Method
ProcessList
ProcessList processes each line of every single file in the data directory and generates a ListInfo of each file.
listinfo.go:48
↓ 1 callers
Method
ToGFWList
ToGFWList converts router.GeoSite to GFWList format.
listinfo.go:329
↓ 1 callers
Method
ToGeoSite
ToGeoSite converts every ListInfo into a router.GeoSite structure. It also excludes rules with certain attributes in certain files that user specified
listinfo.go:259
↓ 1 callers
Method
ToPlainText
ToPlainText convert router.GeoSite structure to plaintext format.
listinfo.go:293
↓ 1 callers
Method
ToProto
ToProto generates a router.GeoSite for each file in data directory and returns a router.GeoSiteList
listinfomap.go:98
↓ 1 callers
Method
addChild
(s string, child *node)
trie.go:28
↓ 1 callers
Method
classifyRule
classifyRule classifies a single rule and write into *ListInfo
listinfo.go:175
↓ 1 callers
Function
envFile
envFile returns the name of the Go environment configuration file. Copy from https://github.com/golang/go/blob/c4f2a9788a7be04daf931ac54382fbe2cb75493
common.go:37
↓ 1 callers
Method
hasChild
(s string)
trie.go:24
↓ 1 callers
Method
isLeaf
()
trie.go:32
↓ 1 callers
Method
parseAttribute
(attr string)
listinfo.go:162
↓ 1 callers
Method
parseInclusion
(inclusion string)
listinfo.go:114
↓ 1 callers
Method
parseRule
parseRule parses a single rule
listinfo.go:77
↓ 1 callers
Method
parseTypeRule
(domain string, rule *router.Domain)
listinfo.go:135
↓ 1 callers
Function
removeComment
removeComment removes comments in the rule
common.go:107
Method
ToGFWList
ToGFWList returns the content of the list to be generated into GFWList format that user wants in bytes format.
listinfomap.go:124
Method
ToPlainText
ToPlainText returns a map of exported lists that user wants and the contents of them in byte format.
listinfomap.go:109
Function
main
()
main.go:23