Skip to content

Commit

Permalink
Merge pull request #444 from akutz/bugfix/fittedcloud-go1.6-support
Browse files Browse the repository at this point in the history
FittedCloud Go1.6 support
  • Loading branch information
akutz authored Feb 25, 2017
2 parents 3175e72 + ec80265 commit 06ca286
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ go_import_path: github.com/codedellemc/libstorage

language: go
go:
- 1.6.3
- 1.7.5
- 1.8
- tip
Expand All @@ -16,8 +17,9 @@ env:

matrix:
allow_failures:
- go: 1.7.5
- go: tip
- go: 1.6.3
- go: 1.7.5
- go: tip
fast_finish: true

before_install:
Expand Down
23 changes: 23 additions & 0 deletions drivers/storage/fittedcloud/utils/utils_pre_go17.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// +build !go1.7
// +build !libstorage_storage_driver libstorage_storage_driver_fittedcloud

package utils

import (
"net/http"

"golang.org/x/net/context/ctxhttp"

"github.com/codedellemc/libstorage/api/types"
)

func doRequest(ctx types.Context, req *http.Request) (*http.Response, error) {
return doRequestWithClient(ctx, http.DefaultClient, req)
}

func doRequestWithClient(
ctx types.Context,
client *http.Client,
req *http.Request) (*http.Response, error) {
return ctxhttp.Do(ctx, client, req)
}

0 comments on commit 06ca286

Please sign in to comment.