diff --git a/aur/aur.go b/aur/aur.go index 4ab0233d..094df781 100644 --- a/aur/aur.go +++ b/aur/aur.go @@ -13,6 +13,9 @@ import ( rpc "github.com/mikkeloscar/aur" ) +// BaseURL givers the AUR default address. +const BaseURL string = "https://aur.archlinux.org" + // NarrowSearch searches AUR and narrows based on subarguments func NarrowSearch(pkgS []string, sortS bool) (Query, error) { if len(pkgS) == 0 { diff --git a/aur/query.go b/aur/query.go index 077c4ee4..45ee406c 100644 --- a/aur/query.go +++ b/aur/query.go @@ -7,8 +7,6 @@ import ( rpc "github.com/mikkeloscar/aur" ) -const aurURL = "https://aur.archlinux.org/rpc/?" - // Query is a collection of Results type Query []rpc.Pkg diff --git a/aur/utils.go b/aur/utils.go deleted file mode 100644 index 4b77206d..00000000 --- a/aur/utils.go +++ /dev/null @@ -1,20 +0,0 @@ -package aur - -import ( - "encoding/json" - "net/http" -) - -// BaseURL givers the AUR default address. -const BaseURL string = "https://aur.archlinux.org" - -// getJSON handles JSON retrieval and decoding to struct -func getJSON(url string, target interface{}) error { - r, err := http.Get(url) - if err != nil { - return err - } - defer r.Body.Close() - - return json.NewDecoder(r.Body).Decode(target) -}