diff --git a/x/sqlite/changes_test.go b/x/sqlite/changes_test.go index 50e177cb..87a66df6 100644 --- a/x/sqlite/changes_test.go +++ b/x/sqlite/changes_test.go @@ -29,7 +29,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) func TestDBChanges(t *testing.T) { diff --git a/x/sqlite/common_test.go b/x/sqlite/common_test.go index 53b2c1bc..75d1400d 100644 --- a/x/sqlite/common_test.go +++ b/x/sqlite/common_test.go @@ -28,7 +28,7 @@ import ( "testing" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) type DB interface { diff --git a/x/sqlite/delete.go b/x/sqlite/delete.go index f668b516..465d40c4 100644 --- a/x/sqlite/delete.go +++ b/x/sqlite/delete.go @@ -17,7 +17,7 @@ import ( "net/http" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal" + internal "github.com/go-kivik/kivik/v4/int/errors" ) func (d *db) Delete(ctx context.Context, docID string, options driver.Options) (string, error) { diff --git a/x/sqlite/delete_test.go b/x/sqlite/delete_test.go index f921b67e..3d8fb044 100644 --- a/x/sqlite/delete_test.go +++ b/x/sqlite/delete_test.go @@ -25,7 +25,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) func TestDBDelete(t *testing.T) { diff --git a/x/sqlite/deleteattachment.go b/x/sqlite/deleteattachment.go index e070ff02..1b64a366 100644 --- a/x/sqlite/deleteattachment.go +++ b/x/sqlite/deleteattachment.go @@ -17,7 +17,7 @@ import ( "net/http" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal" + internal "github.com/go-kivik/kivik/v4/int/errors" ) func (d *db) DeleteAttachment(ctx context.Context, docID, filename string, options driver.Options) (string, error) { diff --git a/x/sqlite/deleteattachment_test.go b/x/sqlite/deleteattachment_test.go index 43320967..6c3bd1ce 100644 --- a/x/sqlite/deleteattachment_test.go +++ b/x/sqlite/deleteattachment_test.go @@ -26,7 +26,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) func TestDBDeleteAttachment(t *testing.T) { diff --git a/x/sqlite/designdocs_test.go b/x/sqlite/designdocs_test.go index 4fdc73ae..06e157f1 100644 --- a/x/sqlite/designdocs_test.go +++ b/x/sqlite/designdocs_test.go @@ -23,7 +23,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) func TestDBDesignDocs(t *testing.T) { diff --git a/x/sqlite/get_test.go b/x/sqlite/get_test.go index 9c1b12b9..0f0990ac 100644 --- a/x/sqlite/get_test.go +++ b/x/sqlite/get_test.go @@ -28,7 +28,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) func TestDBGet(t *testing.T) { diff --git a/x/sqlite/getattachment.go b/x/sqlite/getattachment.go index 06f35af0..1790309e 100644 --- a/x/sqlite/getattachment.go +++ b/x/sqlite/getattachment.go @@ -21,7 +21,7 @@ import ( "net/http" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal" + internal "github.com/go-kivik/kivik/v4/int/errors" ) func (d *db) GetAttachment(ctx context.Context, docID string, filename string, options driver.Options) (*driver.Attachment, error) { diff --git a/x/sqlite/getattachment_test.go b/x/sqlite/getattachment_test.go index 25c59863..51155986 100644 --- a/x/sqlite/getattachment_test.go +++ b/x/sqlite/getattachment_test.go @@ -26,7 +26,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) func TestDBGetAttachment(t *testing.T) { diff --git a/x/sqlite/getattachmentmeta.go b/x/sqlite/getattachmentmeta.go index 4aa56f4d..64f3a3c9 100644 --- a/x/sqlite/getattachmentmeta.go +++ b/x/sqlite/getattachmentmeta.go @@ -19,7 +19,7 @@ import ( "net/http" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal" + internal "github.com/go-kivik/kivik/v4/int/errors" ) func (d *db) GetAttachmentMeta(ctx context.Context, docID, filename string, options driver.Options) (*driver.Attachment, error) { diff --git a/x/sqlite/getattachmentmeta_test.go b/x/sqlite/getattachmentmeta_test.go index e0089ac9..b42f7027 100644 --- a/x/sqlite/getattachmentmeta_test.go +++ b/x/sqlite/getattachmentmeta_test.go @@ -25,7 +25,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) func TestDBGetAttachmentMeta(t *testing.T) { diff --git a/x/sqlite/getrev.go b/x/sqlite/getrev.go index 6b626ca6..343009d6 100644 --- a/x/sqlite/getrev.go +++ b/x/sqlite/getrev.go @@ -19,7 +19,7 @@ import ( "net/http" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal" + internal "github.com/go-kivik/kivik/v4/int/errors" ) func (d *db) GetRev(ctx context.Context, id string, options driver.Options) (string, error) { diff --git a/x/sqlite/getrev_test.go b/x/sqlite/getrev_test.go index 3c97863c..4836db66 100644 --- a/x/sqlite/getrev_test.go +++ b/x/sqlite/getrev_test.go @@ -24,7 +24,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) func TestGetRev(t *testing.T) { diff --git a/x/sqlite/go.mod b/x/sqlite/go.mod index 7d937981..accf2fc2 100644 --- a/x/sqlite/go.mod +++ b/x/sqlite/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/cenkalti/backoff/v4 v4.3.0 github.com/dop251/goja v0.0.0-20240220182346-e401ed450204 - github.com/go-kivik/kivik/v4 v4.2.2 + github.com/go-kivik/kivik/v4 v4.2.4-0.20240603093710-a20699b64fe0 github.com/google/go-cmp v0.6.0 github.com/mitchellh/mapstructure v1.5.0 gitlab.com/flimzy/testy v0.14.0 diff --git a/x/sqlite/go.sum b/x/sqlite/go.sum index c84892bf..2f41f2e7 100644 --- a/x/sqlite/go.sum +++ b/x/sqlite/go.sum @@ -18,8 +18,8 @@ github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= -github.com/go-kivik/kivik/v4 v4.2.2 h1:07eHTCuCMZ9q5/XgOJ4nxDmSZnBt9S+lu0woyMij/nQ= -github.com/go-kivik/kivik/v4 v4.2.2/go.mod h1:cLPiFNZYSL1BB6y+atQrLQ/4+TJd4DsdvGW6iIyIIiY= +github.com/go-kivik/kivik/v4 v4.2.4-0.20240603093710-a20699b64fe0 h1:BL87nAqElmPct8tksu/p5QJIrHsDRQ/U0jjPcn1FZr0= +github.com/go-kivik/kivik/v4 v4.2.4-0.20240603093710-a20699b64fe0/go.mod h1:CJhEne5eDT6YWSWCfJ96uaYB+uAc3UamvmkfHDnozeM= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= diff --git a/x/sqlite/internal/errors.go b/x/sqlite/internal/errors.go deleted file mode 100644 index e6b8ef9c..00000000 --- a/x/sqlite/internal/errors.go +++ /dev/null @@ -1,173 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy of -// the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// Package internal provides some internal utilities. -package internal - -import ( - "errors" - "fmt" - "net/http" - "regexp" - "strconv" - "strings" -) - -// CompositeError represents an HTTP status, encoded in the first byte as the -// status - 400, plus the error message. -type CompositeError string - -func (c CompositeError) Error() string { - return "kivik: " + string(c[4:]) -} - -// HTTPStatus returns c's HTTP status code. -func (c CompositeError) HTTPStatus() int { - i, _ := strconv.Atoi(string(c[:3])) - return i -} - -// Error represents an error returned by Kivik. -// -// This type definition is not guaranteed to remain stable, or even exported. -// When examining errors programatically, you should rely instead on the -// HTTPStatus() function in this package, rather than on directly observing -// the fields of this type. -type Error struct { - // Status is the HTTP status code associated with this error. Normally - // this is the actual HTTP status returned by the server, but in some cases - // it may be generated by Kivik directly. - Status int - - // Message is the error message. - Message string - - // Err is the originating error, if any. - Err error -} - -var ( - _ error = &Error{} - _ statusCoder = &Error{} -) - -func (e *Error) Error() string { - if e.Err == nil { - return e.msg() - } - if e.Message == "" { - return e.Err.Error() - } - return e.Message + ": " + e.Err.Error() -} - -// HTTPStatus returns the HTTP status code associated with the error, or 500 -// (internal server error), if none. -func (e *Error) HTTPStatus() int { - if e.Status == 0 { - return http.StatusInternalServerError - } - return e.Status -} - -// Unwrap satisfies the errors wrapper interface. -func (e *Error) Unwrap() error { - return e.Err -} - -// Format implements [fmt.Formatter]. -func (e *Error) Format(f fmt.State, c rune) { - const partsLen = 3 - parts := make([]string, 0, partsLen) - if e.Message != "" { - parts = append(parts, e.Message) - } - if c == 'v' { - if f.Flag('+') { - parts = append(parts, fmt.Sprintf("%d / %s", e.Status, http.StatusText(e.Status))) - } - } - if e.Err != nil { - parts = append(parts, e.Err.Error()) - } - _, _ = fmt.Fprint(f, strings.Join(parts, ": ")) -} - -func (e *Error) msg() string { - switch e.Message { - case "": - return http.StatusText(e.HTTPStatus()) - default: - return e.Message - } -} - -type statusCoder interface { - HTTPStatus() int -} - -// HTTPStatus returns the HTTP status code embedded in the error, or 500 -// (internal server error), if there was no specified status code. If err is -// nil, HTTPStatus returns 0. -func HTTPStatus(err error) int { - if err == nil { - return 0 - } - var coder statusCoder - for { - if errors.As(err, &coder) { - return coder.HTTPStatus() - } - if uw := errors.Unwrap(err); uw != nil { - err = uw - continue - } - return http.StatusInternalServerError - } -} - -// StatusErrorDiff returns the empty string if the expected error string and -// status match err. Otherwise, it returns a description of the mismatch. -func StatusErrorDiff(wantErr string, wantStatus int, err error) string { - var ( - msg string - status int - ) - if err != nil { - status = HTTPStatus(err) - msg = err.Error() - } - if msg != wantErr || status != wantStatus { - return fmt.Sprintf("Unexpected error: %s [%d] (expected: %s [%d])", - err, status, wantErr, wantStatus) - } - return "" -} - -// StatusErrorDiffRE returns the empty string if the expected error RE and -// status match err. Otherwise, it returns a description of the mismatch. -func StatusErrorDiffRE(wantErrRE string, wantStatus int, err error) string { - re := regexp.MustCompile(wantErrRE) - var ( - msg string - status int - ) - if err != nil { - status = HTTPStatus(err) - msg = err.Error() - } - if !re.MatchString(msg) || status != wantStatus { - return fmt.Sprintf("Unexpected error: %s [%d] (expected: %s [%d])", - err, status, re, wantStatus) - } - return "" -} diff --git a/x/sqlite/internal/mock/options.go b/x/sqlite/internal/mock/options.go deleted file mode 100644 index eff55d9a..00000000 --- a/x/sqlite/internal/mock/options.go +++ /dev/null @@ -1,26 +0,0 @@ -// Licensed under the Apache License, Version 2.0 (the "License"); you may not -// use this file except in compliance with the License. You may obtain a copy of -// the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// License for the specific language governing permissions and limitations under -// the License. - -// Package mock is a partial duplicate of [github.com/go-kivik/v4/internal/mock]. -package mock - -import "github.com/go-kivik/kivik/v4/driver" - -type nilOption bool - -var _ driver.Options = nilOption(false) - -func (nilOption) Apply(interface{}) {} -func (nilOption) String() string { return "NilOption" } - -// NilOption is a nil option. -const NilOption nilOption = false diff --git a/x/sqlite/json.go b/x/sqlite/json.go index 36e98b6b..b6b45fe2 100644 --- a/x/sqlite/json.go +++ b/x/sqlite/json.go @@ -26,7 +26,7 @@ import ( "strconv" "strings" - "github.com/go-kivik/kivik/x/sqlite/v4/internal" + internal "github.com/go-kivik/kivik/v4/int/errors" ) type revision struct { diff --git a/x/sqlite/localdocs_test.go b/x/sqlite/localdocs_test.go index 863936f4..260f4ac8 100644 --- a/x/sqlite/localdocs_test.go +++ b/x/sqlite/localdocs_test.go @@ -23,7 +23,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) func TestDBLocalDocs(t *testing.T) { diff --git a/x/sqlite/openrevs.go b/x/sqlite/openrevs.go index c44ae121..7bf42bac 100644 --- a/x/sqlite/openrevs.go +++ b/x/sqlite/openrevs.go @@ -22,7 +22,7 @@ import ( "strings" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal" + internal "github.com/go-kivik/kivik/v4/int/errors" ) func (d *db) OpenRevs(ctx context.Context, docID string, revs []string, options driver.Options) (driver.Rows, error) { diff --git a/x/sqlite/openrevs_test.go b/x/sqlite/openrevs_test.go index d42eb0aa..3c964a04 100644 --- a/x/sqlite/openrevs_test.go +++ b/x/sqlite/openrevs_test.go @@ -24,7 +24,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) func TestDBOpenRevs(t *testing.T) { diff --git a/x/sqlite/options.go b/x/sqlite/options.go index d418fac9..ca5ce687 100644 --- a/x/sqlite/options.go +++ b/x/sqlite/options.go @@ -20,7 +20,7 @@ import ( "strconv" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal" + internal "github.com/go-kivik/kivik/v4/int/errors" ) type optsMap map[string]interface{} diff --git a/x/sqlite/options_test.go b/x/sqlite/options_test.go index 93f737fe..094485bc 100644 --- a/x/sqlite/options_test.go +++ b/x/sqlite/options_test.go @@ -22,7 +22,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) func Test_viewOptions(t *testing.T) { diff --git a/x/sqlite/put.go b/x/sqlite/put.go index 1c69c61c..37eedf4a 100644 --- a/x/sqlite/put.go +++ b/x/sqlite/put.go @@ -20,7 +20,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal" + internal "github.com/go-kivik/kivik/v4/int/errors" ) func (d *db) Put(ctx context.Context, docID string, doc interface{}, options driver.Options) (string, error) { diff --git a/x/sqlite/put_designdocs_test.go b/x/sqlite/put_designdocs_test.go index f05f213e..cc4494d5 100644 --- a/x/sqlite/put_designdocs_test.go +++ b/x/sqlite/put_designdocs_test.go @@ -27,7 +27,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) type ddoc struct { diff --git a/x/sqlite/put_test.go b/x/sqlite/put_test.go index 8cc3cf5d..fda3af9c 100644 --- a/x/sqlite/put_test.go +++ b/x/sqlite/put_test.go @@ -27,7 +27,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) type attachmentRow struct { diff --git a/x/sqlite/putattachment.go b/x/sqlite/putattachment.go index 30d1a607..a649150b 100644 --- a/x/sqlite/putattachment.go +++ b/x/sqlite/putattachment.go @@ -19,7 +19,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal" + internal "github.com/go-kivik/kivik/v4/int/errors" ) func (d *db) PutAttachment(ctx context.Context, docID string, att *driver.Attachment, options driver.Options) (string, error) { diff --git a/x/sqlite/putattachment_test.go b/x/sqlite/putattachment_test.go index 8e9e160f..e9ac16ae 100644 --- a/x/sqlite/putattachment_test.go +++ b/x/sqlite/putattachment_test.go @@ -28,7 +28,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) func TestDBPutAttachment(t *testing.T) { diff --git a/x/sqlite/query.go b/x/sqlite/query.go index 2e4f2248..85264f3f 100644 --- a/x/sqlite/query.go +++ b/x/sqlite/query.go @@ -26,7 +26,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal" + internal "github.com/go-kivik/kivik/v4/int/errors" ) func fromJSValue(v interface{}) (*string, error) { diff --git a/x/sqlite/query_test.go b/x/sqlite/query_test.go index 9a002f4e..645c07ab 100644 --- a/x/sqlite/query_test.go +++ b/x/sqlite/query_test.go @@ -25,7 +25,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) func TestDBQuery(t *testing.T) { diff --git a/x/sqlite/reduce/functions.go b/x/sqlite/reduce/functions.go index 8691a85e..6d295aa6 100644 --- a/x/sqlite/reduce/functions.go +++ b/x/sqlite/reduce/functions.go @@ -24,7 +24,7 @@ import ( "github.com/dop251/goja" "github.com/mitchellh/mapstructure" - "github.com/go-kivik/kivik/x/sqlite/v4/internal" + internal "github.com/go-kivik/kivik/v4/int/errors" ) // Count is the built-in reduce function, [_count]. diff --git a/x/sqlite/revsdiff.go b/x/sqlite/revsdiff.go index 484240de..a27bcac2 100644 --- a/x/sqlite/revsdiff.go +++ b/x/sqlite/revsdiff.go @@ -23,7 +23,7 @@ import ( "sort" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal" + internal "github.com/go-kivik/kivik/v4/int/errors" ) func toRevDiffRequest(revMap interface{}) (map[string][]string, error) { diff --git a/x/sqlite/sqlite.go b/x/sqlite/sqlite.go index 40ef9a03..e37f6333 100644 --- a/x/sqlite/sqlite.go +++ b/x/sqlite/sqlite.go @@ -25,7 +25,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal" + internal "github.com/go-kivik/kivik/v4/int/errors" ) func init() { diff --git a/x/sqlite/sqlite_test.go b/x/sqlite/sqlite_test.go index 60e146c1..48b3e985 100644 --- a/x/sqlite/sqlite_test.go +++ b/x/sqlite/sqlite_test.go @@ -24,7 +24,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) func TestNewClient(t *testing.T) { diff --git a/x/sqlite/util.go b/x/sqlite/util.go index d9f2ccfb..d7fd2627 100644 --- a/x/sqlite/util.go +++ b/x/sqlite/util.go @@ -23,7 +23,7 @@ import ( "sort" "strings" - "github.com/go-kivik/kivik/x/sqlite/v4/internal" + internal "github.com/go-kivik/kivik/v4/int/errors" ) func placeholders(start, count int) string { diff --git a/x/sqlite/views.go b/x/sqlite/views.go index 41256e92..995f7c84 100644 --- a/x/sqlite/views.go +++ b/x/sqlite/views.go @@ -24,7 +24,7 @@ import ( "strings" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal" + internal "github.com/go-kivik/kivik/v4/int/errors" ) func endKeyOp(descending, inclusive bool) string { diff --git a/x/sqlite/views_test.go b/x/sqlite/views_test.go index e99d1d77..d180e5a8 100644 --- a/x/sqlite/views_test.go +++ b/x/sqlite/views_test.go @@ -28,7 +28,7 @@ import ( "github.com/go-kivik/kivik/v4" "github.com/go-kivik/kivik/v4/driver" - "github.com/go-kivik/kivik/x/sqlite/v4/internal/mock" + "github.com/go-kivik/kivik/v4/int/mock" ) type rowResult struct {