For example have an url like https://www.anphabe.com or https://www.anphabe.com?utm_source=hugo. Now I want change url to https://www.anphabe.com?utm_source=hugo2&utm_campaign=hugo.
Here is my code:
{{ $u := urls.Parse "http://abc.com?test=1#tag" }}
{{ $u.Query Set "test2" "2" }}
{{ printf "%#v" $u }}
I got error: <$q.Set>: can’t call method/function “Set” with 0 results
Please help.
Thanks.