From 0359450b6f6513c15961d6db06d54068e63fdf01 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sat, 5 Dec 2015 19:19:15 +0100 Subject: Small types --- client.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'client.go') diff --git a/client.go b/client.go index bf55f17..1d991ce 100644 --- a/client.go +++ b/client.go @@ -67,8 +67,10 @@ func Post(s NonceSigner, uri string, v interface{}) (*http.Response, error) { return resp, nil } -func parseLinks(r *http.Response) map[string]string { - links := make(map[string]string) +type Links map[string]string + +func parseLinks(r *http.Response) Links { + links := make(Links) key := textproto.CanonicalMIMEHeaderKey("link") reg := regexp.MustCompile(`^<(.*)>;rel="(.*)"`) for _, l := range r.Header[key] { -- cgit v1.2.3