impr: add custom context and custom client posibility #15

This commit is contained in:
Mike Berezin
2023-01-12 12:54:18 +05:00
parent 1b1e6e9e92
commit 7ef8b42b8d
9 changed files with 114 additions and 33 deletions

View File

@@ -6,10 +6,10 @@
package airtable
import (
"io/ioutil"
"log"
"net/http"
"net/http/httptest"
"os"
"path/filepath"
)
@@ -17,7 +17,7 @@ func mockResponse(paths ...string) *httptest.Server {
parts := []string{".", "testdata"}
filename := filepath.Join(append(parts, paths...)...)
mockData, err := ioutil.ReadFile(filename)
mockData, err := os.ReadFile(filename)
if err != nil {
log.Fatal(err)
}