INNER CODE UNIT · Go
IsCustomer
alexellis/derek · auth/customers.go:34
func IsCustomer(ownerLogin string, c *http.Client) (bool, error) {
validate := customerValidationEnabled()
if !validate {
return true, nil
}
var err error
var found bool
customersURL := buildCustomerURL()
request, _ := http.NewRequest(http.MethodGet, customersURL, nil)
res, doErr := c.Do(request)
if doErr != nil {
err = doErr
// Not sure how I feel about goto, but seems OK here (Alex Ellis)
goto DO_RETURN