Answer the question
In order to leave comments, you need to log in
How to parse a link?
Hello.
I receive a link from the user in the following format:
domain.ru/profile/id/?login=lol&pal=156654
I need to parse this domain and get
login=lol
pal
=156654
and validate for
domain.ru/profile/id/
please how can this be done.
I will be very grateful.
Answer the question
In order to leave comments, you need to log in
Hello. The net/url
package has a Parse function . Use it.
Keep an example: https://play.golang.org/p/qpUvsVQ5XD
If directly, then
Google
index string split
Not
directly url.parse.query
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question