mirror of
https://github.com/logos-messaging/go-multiaddr.git
synced 2026-01-06 23:13:08 +00:00
tolerate .b32.i2p if present
This commit is contained in:
parent
fcee0ca9ec
commit
4d3452bc2a
@ -250,6 +250,7 @@ var TranscoderGarlic32 = NewTranscoderFromFunctions(garlic32StB, garlic32BtS, ga
|
|||||||
var garlicBase32Encoding = base32.NewEncoding("abcdefghijklmnopqrstuvwxyz234567")
|
var garlicBase32Encoding = base32.NewEncoding("abcdefghijklmnopqrstuvwxyz234567")
|
||||||
|
|
||||||
func garlic32StB(s string) ([]byte, error) {
|
func garlic32StB(s string) ([]byte, error) {
|
||||||
|
s = strings.Replace(s, ".b32.i2p", "", -1)
|
||||||
// garlic address without the ".b32.i2p" substring
|
// garlic address without the ".b32.i2p" substring
|
||||||
if len(s) < 55 {
|
if len(s) < 55 {
|
||||||
if len(s) != 52 {
|
if len(s) != 52 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user