From 95502626032bd6c4c6d6351483a9b2d8d7c7d148 Mon Sep 17 00:00:00 2001 From: Chewing_Bever Date: Wed, 8 Feb 2023 10:44:13 +0100 Subject: [PATCH] chore: ran v fmt for v 0.3.3 changes --- client.v | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client.v b/client.v index eafc8c4..6d36da6 100644 --- a/client.v +++ b/client.v @@ -15,7 +15,7 @@ pub fn new() &Client { pub fn new_with_url(url string) &Client { if !url.ends_with('/') { return &Client{ - url: '$url/' + url: '${url}/' } } @@ -34,10 +34,10 @@ fn (c Client) request(params map[string][]string) ![]Package { mut param_strings := []string{} for k, v in params { - param_strings << v.map(urllib.query_escape(it)).map('$k=$it') + param_strings << v.map(urllib.query_escape(it)).map('${k}=${it}') } - url := '$c.url?${param_strings.join('&')}' + url := '${c.url}?${param_strings.join('&')}' res := http.get(url)! @@ -49,7 +49,7 @@ fn (c Client) request(params map[string][]string) ![]Package { data := json.decode(Response, res.body)! if data.@type == 'error' { - return error('Server responded with an error: $data.error') + return error('Server responded with an error: ${data.error}') } return data.results @@ -59,7 +59,7 @@ pub fn (c Client) search_by(arg string, st SearchType) ![]Package { params := { 'v': ['5'] 'type': ['search'] - 'by': ['$st'] + 'by': ['${st}'] 'arg': [arg] }