Utility for my infrastructure. Added MainSite function.
This commit is contained in:
parent
bc83e033a1
commit
8341fba20f
14
pkg/utils/dwelling.go
Normal file
14
pkg/utils/dwelling.go
Normal file
@ -0,0 +1,14 @@
|
||||
package utils
|
||||
|
||||
import "strings"
|
||||
|
||||
// MainSite returns homepage address depending on network used.
|
||||
func MainSite(host string) string {
|
||||
if strings.HasPrefix(host, "i2p") {
|
||||
return "http://arav.i2p"
|
||||
} else if strings.HasPrefix(host, "onion") {
|
||||
return "http://.onion"
|
||||
}
|
||||
|
||||
return "https://arav.top"
|
||||
}
|
Loading…
Reference in New Issue
Block a user