When I want to parse my url I get the following error:
panic: parse "http://x:SmT2fH": invalid port ":SmT2fH" after host
This is how I parse it:
s := "http://x:S%40mT2fH#%25PVfTA5gjCtn@host:5432/default"
u, err := url.Parse(s)
if err != nil {
panic(err)
}
fmt.Println(u)
I expect x to be user and S%40mT2fH#%25PVfTA5gjCtn to be password.
But the errors say that it's an invalid port. because it's not port.
Does anyone know the problem?