diff --git a/.travis.yml b/.travis.yml index 9fca1b68..ec1ee49e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ go_import_path: github.com/codedellemc/libstorage language: go go: + - 1.6.3 - 1.7.5 - 1.8 - tip @@ -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: diff --git a/drivers/storage/fittedcloud/utils/utils_pre_go17.go b/drivers/storage/fittedcloud/utils/utils_pre_go17.go new file mode 100644 index 00000000..5d3700db --- /dev/null +++ b/drivers/storage/fittedcloud/utils/utils_pre_go17.go @@ -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) +}