aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2026-04-19 00:47:31 +0200
committerStefan Majewsky <majewsky@gmx.net>2026-04-19 00:47:31 +0200
commit137708df186982c9b60a4f0843ca6b6cbefa8c2a (patch)
tree5a9461231457d480364eeb0241845cf0407cc6e5
parent5a39528a31f9455b106f62eb3dbb141ad584164a (diff)
downloadgo-schwift-137708df186982c9b60a4f0843ca6b6cbefa8c2a.tar.gz
change module path to go.xyrillian.de/schwift/v2
-rw-r--r--CHANGELOG.md7
-rw-r--r--CONTRIBUTING.md8
-rw-r--r--Makefile.maker.yaml2
-rw-r--r--README.md18
-rw-r--r--bulk.go4
-rw-r--r--doc.go2
-rw-r--r--errors.go2
-rw-r--r--go.mod2
-rw-r--r--gopherschwift/package.go4
-rw-r--r--tests/account_test.go2
-rw-r--r--tests/backend_test.go2
-rw-r--r--tests/bulk_delete_test.go4
-rw-r--r--tests/bulk_upload_test.go4
-rw-r--r--tests/container_iterator_test.go2
-rw-r--r--tests/container_test.go2
-rw-r--r--tests/field_test.go2
-rw-r--r--tests/headers_test.go2
-rw-r--r--tests/largeobject_test.go2
-rw-r--r--tests/object_iterator_test.go2
-rw-r--r--tests/object_test.go2
-rw-r--r--tests/shared_test.go4
21 files changed, 42 insertions, 37 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4779716..34a32be 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,10 @@
+# v2.1.0 (TBD)
+
+Changes:
+
+- The library must now be imported from the new module path `go.xyrillian.de/schwift/v2`.
+ The Go compiler should throw suitable errors after upgrading with `go get -u`.
+
# v2.0.0 (2024-07-08)
Breaking changes:
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 96ae415..4b0d100 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,10 +2,8 @@
Before submitting a pull request:
-- Please format your code with `gofmt` or `goimports`.
-- Please fix warnings generated by `golint` and `go vet`.
-- When changing the API, run `godoc -http=:6060`, point your browser to
- http://localhost:6060/pkg/github.com/majewsky/schwift and check how your documentation looks.
+- Please run `make check` and fix all warnings and errors.
+- When changing the API, run `go doc -http` and check how the documentation looks.
As a general rule of thumb, we prefer idiomatic Go code as described in:
@@ -34,6 +32,6 @@ container](https://github.com/bouncestorage/docker-swift).
group). Once that has come up successfully, press Ctrl-C to get back to your terminal prompt; the SAIO container will
continue running.
-2. Run the tests with `./testing/with-saio.sh go test`. The script will find how to access the Swift API inside the
+2. Run the tests with `./testing/with-saio.sh make check`. The script will find how to access the Swift API inside the
container, and configure the auth environment variables accordingly. You can use this with any command that requires
Swift credentials, e.g. `./testing/with-saio.sh swift stat`.
diff --git a/Makefile.maker.yaml b/Makefile.maker.yaml
index 1875a35..9b95cb0 100644
--- a/Makefile.maker.yaml
+++ b/Makefile.maker.yaml
@@ -1,7 +1,7 @@
# Configuration file for <https://github.com/sapcc/go-makefile-maker>
metadata:
- url: https://github.com/majewsky/schwift
+ url: https://go.xyrillian.de/schwift
coverageTest:
except: '/util'
diff --git a/README.md b/README.md
index d7f9f83..1ff26f1 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Schwift
-[![GoDoc](https://godoc.org/github.com/majewsky/schwift?status.svg)](https://godoc.org/github.com/majewsky/schwift)
+[![GoDoc](https://godoc.org/go.xyrillian.de/schwift/v2?status.svg)](https://godoc.org/go.xyrillian.de/schwift/v2)
This is a Go client library for [OpenStack Swift](https://github.com/openstack/swift). I made this after growing
frustrated with the inflexible API design of [`ncw/swift`](https://github.com/ncw/swift); see [near the
@@ -8,7 +8,7 @@ bottom](#why-another-swift-client-library) for details.
## Installation
-You can get this with `go get github.com/majewsky/schwift`. When using this in an application, vendoring is recommended.
+You can get this with `go get go.xyrillian.de/schwift/v2`. When using this in an application, vendoring is recommended.
## Usage
@@ -18,9 +18,9 @@ For example, to connect to Swift using OpenStack Keystone authentication:
```go
import (
- "github.com/gophercloud/gophercloud"
- "github.com/gophercloud/gophercloud/openstack"
- "github.com/majewsky/schwift/gopherschwift"
+ "github.com/gophercloud/gophercloud/v2"
+ "github.com/gophercloud/gophercloud/v2/openstack"
+ "go.xyrillian.de/schwift/v2/gopherschwift"
)
authOptions, err := openstack.AuthOptionsFromEnv()
@@ -34,9 +34,9 @@ To connect to Swift using Swift's built-in authentication:
```go
import (
- "github.com/gophercloud/gophercloud/openstack"
- "github.com/gophercloud/gophercloud/openstack/objectstore/v1/swauth"
- "github.com/majewsky/schwift/gopherschwift"
+ "github.com/gophercloud/gophercloud/v2/openstack"
+ "github.com/gophercloud/gophercloud/v2/openstack/objectstore/v1/swauth"
+ "go.xyrillian.de/schwift/v2/gopherschwift"
)
provider, err := openstack.NewClient("http://swift.example.com:8080")
@@ -48,7 +48,7 @@ client, err := swauth.NewObjectStorageV1(provider, swauth.AuthOpts {
account, err := gopherschwift.Wrap(client, nil)
```
-From this point, follow the [API documentation](https://godoc.org/github.com/majewsky/schwift) for what you can do with
+From this point, follow the [API documentation](https://pkg.go.dev/go.xyrillian.de/schwift/v2) for what you can do with
the `schwift.Account` object. For example, to download an object's contents into a string:
```go
diff --git a/bulk.go b/bulk.go
index 0669d31..a21f199 100644
--- a/bulk.go
+++ b/bulk.go
@@ -28,8 +28,8 @@ import (
"strconv"
"strings"
- "github.com/majewsky/schwift/v2/capabilities"
- "github.com/majewsky/schwift/v2/internal/errext"
+ "go.xyrillian.de/schwift/v2/capabilities"
+ "go.xyrillian.de/schwift/v2/internal/errext"
)
// BulkUploadFormat enumerates possible archive formats for Container.BulkUpload().
diff --git a/doc.go b/doc.go
index 7b49e04..cdaf1e4 100644
--- a/doc.go
+++ b/doc.go
@@ -53,7 +53,7 @@ Then, in all these cases, you use gopherschwift to convert the
gophercloud.ServiceClient into a schwift.Account instance, from which point you
have access to all of schwift's API:
- import "github.com/majewsky/schwift/v2/gopherschwift"
+ import "go.xyrillian.de/schwift/v2/gopherschwift"
account, err := gopherschwift.Wrap(client)
diff --git a/errors.go b/errors.go
index 25fdde0..1957aeb 100644
--- a/errors.go
+++ b/errors.go
@@ -25,7 +25,7 @@ import (
"strconv"
"strings"
- "github.com/majewsky/schwift/v2/internal/errext"
+ "go.xyrillian.de/schwift/v2/internal/errext"
)
var (
diff --git a/go.mod b/go.mod
index 0fd37c5..577292c 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/majewsky/schwift/v2
+module go.xyrillian.de/schwift/v2
go 1.22
diff --git a/gopherschwift/package.go b/gopherschwift/package.go
index 743ac0f..d6b4e7b 100644
--- a/gopherschwift/package.go
+++ b/gopherschwift/package.go
@@ -27,7 +27,7 @@ so you only need to obtain a client token once using Gophercloud. For example:
import (
"github.com/gophercloud/gophercloud/v2/openstack"
"github.com/gophercloud/utils/v2/openstack/clientconfig"
- "github.com/majewsky/schwift/v2/gopherschwift"
+ "go.xyrillian.de/schwift/v2/gopherschwift"
)
provider, err := clientconfig.AuthenticatedClient(nil)
@@ -45,7 +45,7 @@ import (
"github.com/gophercloud/gophercloud/v2"
- "github.com/majewsky/schwift/v2"
+ "go.xyrillian.de/schwift/v2"
)
// Options contains additional options that can be passed to Wrap().
diff --git a/tests/account_test.go b/tests/account_test.go
index 67ce2df..d8b563d 100644
--- a/tests/account_test.go
+++ b/tests/account_test.go
@@ -22,7 +22,7 @@ import (
"context"
"testing"
- "github.com/majewsky/schwift/v2"
+ "go.xyrillian.de/schwift/v2"
)
func TestAccountBasic(t *testing.T) {
diff --git a/tests/backend_test.go b/tests/backend_test.go
index 93a1b1d..f18a9c6 100644
--- a/tests/backend_test.go
+++ b/tests/backend_test.go
@@ -21,7 +21,7 @@ package tests
import (
"net/http"
- "github.com/majewsky/schwift/v2"
+ "go.xyrillian.de/schwift/v2"
)
type RequestCountingBackend struct {
diff --git a/tests/bulk_delete_test.go b/tests/bulk_delete_test.go
index a864942..2e5d909 100644
--- a/tests/bulk_delete_test.go
+++ b/tests/bulk_delete_test.go
@@ -24,8 +24,8 @@ import (
"strings"
"testing"
- "github.com/majewsky/schwift/v2"
- "github.com/majewsky/schwift/v2/capabilities"
+ "go.xyrillian.de/schwift/v2"
+ "go.xyrillian.de/schwift/v2/capabilities"
)
func TestBulkDeleteSuccess(t *testing.T) {
diff --git a/tests/bulk_upload_test.go b/tests/bulk_upload_test.go
index bb71a49..75420a5 100644
--- a/tests/bulk_upload_test.go
+++ b/tests/bulk_upload_test.go
@@ -25,8 +25,8 @@ import (
"strings"
"testing"
- "github.com/majewsky/schwift/v2"
- "github.com/majewsky/schwift/v2/internal/errext"
+ "go.xyrillian.de/schwift/v2"
+ "go.xyrillian.de/schwift/v2/internal/errext"
)
func TestBulkUploadSuccess(t *testing.T) {
diff --git a/tests/container_iterator_test.go b/tests/container_iterator_test.go
index 415c803..26feecf 100644
--- a/tests/container_iterator_test.go
+++ b/tests/container_iterator_test.go
@@ -23,7 +23,7 @@ import (
"fmt"
"testing"
- "github.com/majewsky/schwift/v2"
+ "go.xyrillian.de/schwift/v2"
)
func TestContainerIterator(t *testing.T) {
diff --git a/tests/container_test.go b/tests/container_test.go
index 2c816b5..192487b 100644
--- a/tests/container_test.go
+++ b/tests/container_test.go
@@ -24,7 +24,7 @@ import (
"net/http"
"testing"
- "github.com/majewsky/schwift/v2"
+ "go.xyrillian.de/schwift/v2"
)
func TestContainerLifecycle(t *testing.T) {
diff --git a/tests/field_test.go b/tests/field_test.go
index e321305..be09a17 100644
--- a/tests/field_test.go
+++ b/tests/field_test.go
@@ -24,7 +24,7 @@ import (
"strconv"
"testing"
- "github.com/majewsky/schwift/v2"
+ "go.xyrillian.de/schwift/v2"
)
func TestFieldString(t *testing.T) {
diff --git a/tests/headers_test.go b/tests/headers_test.go
index e4aebf0..7e4b253 100644
--- a/tests/headers_test.go
+++ b/tests/headers_test.go
@@ -21,7 +21,7 @@ package tests
import (
"testing"
- "github.com/majewsky/schwift/v2"
+ "go.xyrillian.de/schwift/v2"
)
func TestParseAccountHeadersSuccess(t *testing.T) {
diff --git a/tests/largeobject_test.go b/tests/largeobject_test.go
index 1711211..9c7f093 100644
--- a/tests/largeobject_test.go
+++ b/tests/largeobject_test.go
@@ -26,7 +26,7 @@ import (
"testing"
"time"
- "github.com/majewsky/schwift/v2"
+ "go.xyrillian.de/schwift/v2"
)
func foreachLargeObjectStrategy(action func(schwift.LargeObjectStrategy, string)) {
diff --git a/tests/object_iterator_test.go b/tests/object_iterator_test.go
index 0f61c79..ac10dbc 100644
--- a/tests/object_iterator_test.go
+++ b/tests/object_iterator_test.go
@@ -25,7 +25,7 @@ import (
"strings"
"testing"
- "github.com/majewsky/schwift/v2"
+ "go.xyrillian.de/schwift/v2"
)
var objectExampleContent = []byte(`{"message":"Hello World!"}`)
diff --git a/tests/object_test.go b/tests/object_test.go
index 6130dfb..dd1b4c2 100644
--- a/tests/object_test.go
+++ b/tests/object_test.go
@@ -27,7 +27,7 @@ import (
"strings"
"testing"
- "github.com/majewsky/schwift/v2"
+ "go.xyrillian.de/schwift/v2"
)
func TestObjectLifecycle(t *testing.T) {
diff --git a/tests/shared_test.go b/tests/shared_test.go
index 57bed27..7cae4a5 100644
--- a/tests/shared_test.go
+++ b/tests/shared_test.go
@@ -32,8 +32,8 @@ import (
"github.com/gophercloud/gophercloud/v2/openstack/objectstorage/v1/swauth"
"github.com/gophercloud/utils/v2/openstack/clientconfig"
- "github.com/majewsky/schwift/v2"
- "github.com/majewsky/schwift/v2/gopherschwift"
+ "go.xyrillian.de/schwift/v2"
+ "go.xyrillian.de/schwift/v2/gopherschwift"
)
func testWithAccount(t *testing.T, testCode func(a *schwift.Account)) {