func getFullURL(url, manager, name string) string {
	fullURL := url + name
	switch manager {
	case "pip":
		fullURL = fullURL + "/json"
	case "gem":
		fullURL = fullURL + ".json"
	}
	return fullURL
}
Get full url of the package manager based on name
package main
import (
	"fmt"
	"net/http"
	"runtime"
)
type PackageResponse struct {
	packageManager string
	statusCode     int
}
func getPackageStatus(name, url string, ch chan<- PackageResponse) {
	resp, err := http.Get(url)
	if err != nil {
		ch <- PackageResponse{name, 500}
		return
	}
	ch <- PackageResponse{name, resp.StatusCode}
	resp.Body.Close()
}