update go modules

This commit is contained in:
idk
2023-03-07 02:11:16 +00:00
parent 9307ae9cf4
commit 28d6bf4d97

View File

@ -242,7 +242,7 @@ func (a I2PAddr) Base64() string {
// Returns the I2P destination (base32-encoded)
func (a I2PAddr) String() string {
if StringIsBase64 {
return a.Base64() + ".i2p"
return a.Base64()
}
return string(a.Base32())
}
@ -267,7 +267,7 @@ func NewI2PAddrFromString(addr string) (I2PAddr, error) {
addr = strings.Trim(addr, "\t\n\r\f ")
// very basic check
if len(addr) > 4096 || len(addr) < 516 {
return I2PAddr(""), errors.New("Not an I2P address")
return I2PAddr(""), errors.New(addr + " is not an I2P address")
}
buf := make([]byte, i2pB64enc.DecodedLen(len(addr)))
if _, err := i2pB64enc.Decode(buf, []byte(addr)); err != nil {