Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HostMapping = map[string]string{
"ibb.co": "imgbb",
"pixhost.cc": "pixhost",
"pixhost.to": "pixhost",
"imgbox.com": "imgbox",
"beyondhd.co": "bhd",
"imagebam.com": "bam",
"onlyimage.org": "onlyimage",
"ptscreens.com": "ptscreens",
"img.passtheima.ge": "passtheimage",
"imgur.com": "imgur",
"postimg.cc": "postimg",
"samaritano.cc": "samaritano",
"digitalcore.club": "sharex",
"img.digitalcore.club": "sharex",
"kshare.club": "kshare",
"img.pterclub.com": "pterclub",
"s3.pterclub.com": "pterclub",
"yes.ilikeshots.club": "ilikeshots",
"imgbox": "imgbox",
"i.ibb.co": "imgbb",
}
HostMapping is the process-wide URL-host normalization table used by ExtractHost. Treat it as read-only after startup; ExtractHost reads it without synchronization.
Functions ¶
func ExtractHost ¶
ExtractHost returns the mapped image-host name for a URL, checking the exact lowercased host, a removed "www." prefix, and the final two labels in that order. Invalid or hostless URLs return empty; unmatched hosts are returned as lowercased URL hosts.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.