From 85c525f82c51fbca6b0ce6b464fab6c09df12aa4 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 6 Mar 2022 01:12:27 +0530 Subject: fixed import cycle error --- errhandlers/errors.go | 2 -- util/url_generator.go | 6 ++++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/errhandlers/errors.go b/errhandlers/errors.go index 4ea4311..54ae0e0 100644 --- a/errhandlers/errors.go +++ b/errhandlers/errors.go @@ -30,8 +30,6 @@ var InvalidSeasonError error = errors.New("InvalidSeasonError: Invalid sea var InvalidSortError error = errors.New("InvalidSortError: Invalid sort type specifield.") var InvalidStatusError error = errors.New("InvalidStatusError: Invalid status specified.") -var URLNameValueError error = errors.New("URLNameValueError: Number of names and values passed to URLGenerator don't match.") - var InvalidScoreError error = errors.New("InvalidScoreError: Score should lie between 0-10.") var InvalidPriorityError error = errors.New("InvalidPriorityError: Priority should lie between 0-2.") var InvalidRewatchValueError error = errors.New("InvalidRewatchValueError: Rewatch value should lie between 0-5.") diff --git a/util/url_generator.go b/util/url_generator.go index d0f5eea..7e548f5 100644 --- a/util/url_generator.go +++ b/util/url_generator.go @@ -17,13 +17,15 @@ package util import ( - e "github.com/MikunoNaka/MAL2Go/errhandlers" + "errors" ) +var URLNameValueError error = errors.New("URLNameValueError: Number of names and values passed to URLGenerator don't match.") + func UrlGenerator(baseUrl string, names []string, values [][]string, isPrimary bool) (string, error) { // length of names and values should be same if cap(names) != cap(values) { - return "", e.URLNameValueError + return "", URLNameValueError } var fields string -- cgit v1.2.3