diff options
Diffstat (limited to 'anime/util.go')
-rw-r--r-- | anime/util.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/anime/util.go b/anime/util.go index f09f189..34ba863 100644 --- a/anime/util.go +++ b/anime/util.go @@ -36,7 +36,7 @@ func requestHandler(token string, endpoint string) string { } func urlGenerator(baseUrl string, names []string, values [][]string, isPrimary bool) (string, error) { - // TODO: error if cap(names) != cap(values) + // length of names and values should be same if cap(names) != cap(values) { return "", errors.New("urlGenerator: Error: Length of names and values don't match.") } @@ -50,7 +50,7 @@ func urlGenerator(baseUrl string, names []string, values [][]string, isPrimary b * else it is &nextkey=value */ if isPrimary { data = "?" + name + "=" - } else { + } else { data = "&" + name + "=" } |