Skip to content

Commit

Permalink
FittedCloud Go1.6 support
Browse files Browse the repository at this point in the history
This patch adds Go1.6 support to the FittedCloud storage driver.
  • Loading branch information
akutz committed Feb 25, 2017
1 parent 3175e72 commit ec80265
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 ec80265

Please sign in to comment.