From 85e5dcdddcd2f85f76ab1dac67bcb9bfe0a88118 Mon Sep 17 00:00:00 2001 From: Will Norris Date: Mon, 4 May 2015 10:26:22 -0700 Subject: [PATCH] rsc.io/grind cleanup --- data.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data.go b/data.go index 6505d2e..6a19004 100644 --- a/data.go +++ b/data.go @@ -142,7 +142,7 @@ func (o Options) String() string { // 100,fv,fh - 100 pixels square, flipped horizontal and vertical // 200x,q80 - 200 pixels wide, proportional height, 80% quality func ParseOptions(str string) Options { - options := Options{} + var options Options for _, opt := range strings.Split(str, ",") { switch { @@ -212,6 +212,7 @@ func NewRequest(r *http.Request, baseURL *url.URL) (*Request, error) { return nil, URLError{"too few path segments", r.URL} } + var err error req.URL, err = url.Parse(parts[1]) if err != nil { return nil, URLError{fmt.Sprintf("unable to parse remote URL: %v", err), r.URL}