Added my little whining on always empty scheme in a comment on NetworkType() func.
This commit is contained in:
parent
d56620ea9e
commit
1cb4ba8c5c
@ -15,6 +15,9 @@ func MainSite(host string) string {
|
|||||||
|
|
||||||
// NetworkType detects network based on host suffix,
|
// NetworkType detects network based on host suffix,
|
||||||
// whether client connected from Tor, I2P or Clearnet.
|
// whether client connected from Tor, I2P or Clearnet.
|
||||||
|
// Holy shit, net/http/Response doesn't actually save
|
||||||
|
// a URL.Scheme and just spit out an empty string.
|
||||||
|
// What a shame.
|
||||||
func NetworkType(host string) (string, string) {
|
func NetworkType(host string) (string, string) {
|
||||||
if strings.Contains(host, "i2p") {
|
if strings.Contains(host, "i2p") {
|
||||||
return "i2p", "http"
|
return "i2p", "http"
|
||||||
|
Loading…
Reference in New Issue
Block a user