aboutsummaryrefslogtreecommitdiff
path: root/util/url_generator.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@protonmail.ch>2022-03-06 01:12:27 +0530
committerVidhu Kant Sharma <vidhukant@protonmail.ch>2022-03-06 01:12:27 +0530
commit85c525f82c51fbca6b0ce6b464fab6c09df12aa4 (patch)
tree50a88cbca680013499e3fdedccbcfe206f5be234 /util/url_generator.go
parentb6f42d806d0e0f5e59c7615cd1558e75c5b314f1 (diff)
fixed import cycle error
Diffstat (limited to 'util/url_generator.go')
-rw-r--r--util/url_generator.go6
1 files changed, 4 insertions, 2 deletions
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