-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch adds Go1.6 support to the FittedCloud storage driver.
- Loading branch information
Showing
2 changed files
with
27 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} |