all repos — searchix @ 58a7fc78b8e17dc4ce009767afd9066bbaa9328f

Search engine for NixOS, nix-darwin, home-manager and NUR users

refactor: use encoding/xml for OpenSearchDescription

Alan Pearce
commit

58a7fc78b8e17dc4ce009767afd9066bbaa9328f

parent

a1dfc548198a1326e71f1dd70303a5d3441f7a39

1 file changed, 12 insertions(+), 0 deletions(-)

changed files
M internal/config/config.gointernal/config/config.go
@@ -31,6 +31,18 @@
return nil } +func (u *URL) JoinPath(elems ...string) *URL { + return &URL{u.URL.JoinPath(elems...)} +} + +func (u *URL) AddQuery(key, value string) *URL { + q := u.URL.Query() + q.Add(key, value) + u.RawQuery = q.Encode() + + return u +} + type Duration struct { time.Duration }