diff --git a/README.md b/README.md index 1c9f6c345..d179bda75 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ## [Website](https://beyondstorage.io) | [Documentation](https://beyondstorage.io/docs/go-storage/index) | [Community](https://beyondstorage.io/community) [![Build Status](https://github.com/beyondstorage/go-storage/workflows/Unit%20Test/badge.svg?branch=master)](https://github.com/beyondstorage/go-storage/actions?query=workflow%3A%22Unit+Test%22) -[![Go dev](https://pkg.go.dev/badge/github.com/beyondstorage/go-storage/v4)](https://pkg.go.dev/github.com/beyondstorage/go-storage/v4) +[![Go dev](https://pkg.go.dev/badge/go.beyondstorage.io/v5)](https://pkg.go.dev/go.beyondstorage.io/v5) [![License](https://img.shields.io/badge/license-apache%20v2-blue.svg)](https://github.com/beyondstorage/go-storage/blob/master/LICENSE) [![go storage dev](https://img.shields.io/matrix/beyondstorage@go-storage:matrix.org.svg?label=go-storage&logo=matrix)](https://matrix.to/#/#beyondstorage@go-storage:matrix.org) @@ -27,8 +27,8 @@ package main import ( "log" - "github.com/beyondstorage/go-storage/v4/services" - "github.com/beyondstorage/go-storage/v4/types" + "go.beyondstorage.io/v5/services" + "go.beyondstorage.io/v5/types" // Add fs support _ "github.com/beyondstorage/go-service-fs/v3" diff --git a/README.zh-CN.md b/README.zh-CN.md index c8c45da79..2124fa1c1 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -3,7 +3,7 @@ ## [网站](https://beyondstorage.io) | [文档](https://beyondstorage.io/docs/go-storage/index) | [社区](https://beyondstorage.io/community) [![Build Status](https://github.com/beyondstorage/go-storage/workflows/Unit%20Test/badge.svg?branch=master)](https://github.com/beyondstorage/go-storage/actions?query=workflow%3A%22Unit+Test%22) -[![Go dev](https://pkg.go.dev/badge/github.com/beyondstorage/go-storage/v4)](https://pkg.go.dev/github.com/beyondstorage/go-storage/v4) +[![Go dev](https://pkg.go.dev/badge/go.beyondstorage.io/v5)](https://pkg.go.dev/go.beyondstorage.io/v5) [![License](https://img.shields.io/badge/license-apache%20v2-blue.svg)](https://github.com/beyondstorage/go-storage/blob/master/LICENSE) [![go storage dev](https://img.shields.io/matrix/beyondstorage@go-storage:matrix.org.svg?label=go-storage&logo=matrix)](https://matrix.to/#/#beyondstorage@go-storage:matrix.org) @@ -27,8 +27,8 @@ package main import ( "log" - "github.com/beyondstorage/go-storage/v4/services" - "github.com/beyondstorage/go-storage/v4/types" + "go.beyondstorage.io/v5/services" + "go.beyondstorage.io/v5/types" // 添加 fs 支持 _ "github.com/beyondstorage/go-service-fs/v3" diff --git a/cmd/definitions/bindata/bindata.go b/cmd/definitions/bindata/bindata.go index 270d7a9c1..7bd8d5d00 100644 --- a/cmd/definitions/bindata/bindata.go +++ b/cmd/definitions/bindata/bindata.go @@ -7,8 +7,6 @@ // definitions/operations.toml (10.788kB) // definitions/pairs.toml (1.616kB) -// +build tools - package bindata import ( diff --git a/cmd/definitions/gen_pair.go b/cmd/definitions/gen_pair.go index fe283ba90..026e511c4 100644 --- a/cmd/definitions/gen_pair.go +++ b/cmd/definitions/gen_pair.go @@ -19,8 +19,8 @@ func generatePair(data *Data, path string) { AddPath("context"). AddPath("time"). AddLine(). - AddPath("github.com/beyondstorage/go-storage/v4/pkg/httpclient"). - AddDot("github.com/beyondstorage/go-storage/v4/types") + AddPath("go.beyondstorage.io/v5/pkg/httpclient"). + AddDot("go.beyondstorage.io/v5/types") ps := make([]*Pair, 0, len(data.PairsMap)) for _, v := range data.PairsMap { diff --git a/cmd/definitions/gen_service.go b/cmd/definitions/gen_service.go index d714a7731..d7687263c 100644 --- a/cmd/definitions/gen_service.go +++ b/cmd/definitions/gen_service.go @@ -21,10 +21,10 @@ func generateSrv(data *Service, path string) { AddPath("strings"). AddPath("time"). AddLine(). - AddDot("github.com/beyondstorage/go-storage/v4/pairs"). - AddPath("github.com/beyondstorage/go-storage/v4/pkg/httpclient"). - AddPath("github.com/beyondstorage/go-storage/v4/services"). - AddDot("github.com/beyondstorage/go-storage/v4/types") + AddDot("go.beyondstorage.io/v5/pairs"). + AddPath("go.beyondstorage.io/v5/pkg/httpclient"). + AddPath("go.beyondstorage.io/v5/services"). + AddDot("go.beyondstorage.io/v5/types") f.NewVar(). AddDecl("_", "Storager"). diff --git a/cmd/definitions/type.go b/cmd/definitions/type.go index eea27f9ff..43db7ca14 100644 --- a/cmd/definitions/type.go +++ b/cmd/definitions/type.go @@ -12,7 +12,7 @@ import ( "github.com/pelletier/go-toml" log "github.com/sirupsen/logrus" - "github.com/beyondstorage/go-storage/v4/cmd/definitions/bindata" + "go.beyondstorage.io/v5/cmd/definitions/bindata" ) // Data is the biggest container for all definitions. diff --git a/doc.go b/doc.go index 35508f6ce..2483b7348 100644 --- a/doc.go +++ b/doc.go @@ -32,5 +32,8 @@ The most common case to use a Storager service could be following: */ package storage -//go:generate go run github.com/kevinburke/go-bindata/go-bindata -nometadata -o ./cmd/definitions/bindata/bindata.go -pkg bindata -tags tools ./definitions +// We used to insert "-tags tools" here, but go-bindata doesn't support the new build +// tag that introduced in go 1.17. So we remove the tags here. +// In the further, we will move to go 1.16 embed to solve this problem. +//go:generate go run github.com/kevinburke/go-bindata/go-bindata -nometadata -o ./cmd/definitions/bindata/bindata.go -pkg bindata ./definitions //go:generate go run -tags tools ./cmd/definitions diff --git a/docs/rfcs/840-convert-to-monorepo.md b/docs/rfcs/840-convert-to-monorepo.md index 82d977817..2112a8091 100644 --- a/docs/rfcs/840-convert-to-monorepo.md +++ b/docs/rfcs/840-convert-to-monorepo.md @@ -75,9 +75,9 @@ go-storage The module path will be: -- `github.com/beyondstorage/go-storage/v4/types` -> `beyondstorage.io/go/v4/types` -- `github.com/beyondstorage/go-service-s3/v2` -> `beyondstorage.io/go/services/s3/v2` -- `github.com/beyondstorage/go-service-gcs/v2` -> `beyondstorage.io/go/services/gcs/v2` +- `github.com/beyondstorage/go-storage/v4/types` -> `go.beyondstorage.io/v4/types` +- `github.com/beyondstorage/go-service-s3/v2` -> `go.beyondstorage.io/services/s3/v2` +- `github.com/beyondstorage/go-service-gcs/v2` -> `go.beyondstorage.io/services/gcs/v2` ## Rationale diff --git a/go.mod b/go.mod index 4fd1fe8ff..a4b9beb40 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/beyondstorage/go-storage/v4 +module go.beyondstorage.io/v5 go 1.15 diff --git a/pairs/generated.go b/pairs/generated.go index 96bbfb56b..e2e21fd86 100644 --- a/pairs/generated.go +++ b/pairs/generated.go @@ -5,8 +5,8 @@ import ( "context" "time" - "github.com/beyondstorage/go-storage/v4/pkg/httpclient" - . "github.com/beyondstorage/go-storage/v4/types" + "go.beyondstorage.io/v5/pkg/httpclient" + . "go.beyondstorage.io/v5/types" ) // WithContentMd5 will apply content_md5 value to Options. diff --git a/pkg/fswrap/fileinfo.go b/pkg/fswrap/fileinfo.go index 311b635fa..0ae0a9353 100644 --- a/pkg/fswrap/fileinfo.go +++ b/pkg/fswrap/fileinfo.go @@ -4,7 +4,7 @@ import ( "os" "time" - "github.com/beyondstorage/go-storage/v4/types" + "go.beyondstorage.io/v5/types" ) type fileInfoWrapper struct { diff --git a/pkg/fswrap/httpfs.go b/pkg/fswrap/httpfs.go index 35591b8c5..6651e4cbf 100644 --- a/pkg/fswrap/httpfs.go +++ b/pkg/fswrap/httpfs.go @@ -7,8 +7,8 @@ import ( "net/http" "os" - "github.com/beyondstorage/go-storage/v4/pairs" - "github.com/beyondstorage/go-storage/v4/types" + "go.beyondstorage.io/v5/pairs" + "go.beyondstorage.io/v5/types" ) var ( diff --git a/pkg/fswrap/iofs.go b/pkg/fswrap/iofs.go index 1870dd0b0..278bad594 100644 --- a/pkg/fswrap/iofs.go +++ b/pkg/fswrap/iofs.go @@ -9,8 +9,8 @@ import ( "io/fs" "path" - "github.com/beyondstorage/go-storage/v4/pairs" - "github.com/beyondstorage/go-storage/v4/types" + "go.beyondstorage.io/v5/pairs" + "go.beyondstorage.io/v5/types" ) var ( diff --git a/pkg/iowrap/pipe_bench_test.go b/pkg/iowrap/pipe_bench_test.go index 1319b2348..487c43bd1 100644 --- a/pkg/iowrap/pipe_bench_test.go +++ b/pkg/iowrap/pipe_bench_test.go @@ -5,7 +5,7 @@ import ( "io/ioutil" "testing" - "github.com/beyondstorage/go-storage/v4/pkg/randbytes" + "go.beyondstorage.io/v5/pkg/randbytes" ) func BenchmarkStdPipe(b *testing.B) { diff --git a/pkg/iowrap/pipe_test.go b/pkg/iowrap/pipe_test.go index 43f9f6429..64d29275c 100644 --- a/pkg/iowrap/pipe_test.go +++ b/pkg/iowrap/pipe_test.go @@ -1,8 +1,8 @@ package iowrap import ( - "github.com/beyondstorage/go-storage/v4/pkg/randbytes" "github.com/stretchr/testify/assert" + "go.beyondstorage.io/v5/pkg/randbytes" "io" "io/ioutil" "testing" diff --git a/services/error.go b/services/error.go index 6c64f8ccb..15ad6b0ad 100644 --- a/services/error.go +++ b/services/error.go @@ -3,7 +3,7 @@ package services import ( "fmt" - "github.com/beyondstorage/go-storage/v4/types" + "go.beyondstorage.io/v5/types" ) type InternalError interface { diff --git a/services/new.go b/services/new.go index b17002429..bc03d4389 100644 --- a/services/new.go +++ b/services/new.go @@ -8,8 +8,8 @@ import ( "sync" "time" - "github.com/beyondstorage/go-storage/v4/pairs" - "github.com/beyondstorage/go-storage/v4/types" + "go.beyondstorage.io/v5/pairs" + "go.beyondstorage.io/v5/types" ) type ( diff --git a/tests/connstr_test.go b/tests/connstr_test.go index 6115c1089..0f1681593 100644 --- a/tests/connstr_test.go +++ b/tests/connstr_test.go @@ -4,10 +4,10 @@ import ( "errors" "testing" - "github.com/beyondstorage/go-storage/v4/pairs" - "github.com/beyondstorage/go-storage/v4/services" - . "github.com/beyondstorage/go-storage/v4/types" "github.com/stretchr/testify/assert" + "go.beyondstorage.io/v5/pairs" + "go.beyondstorage.io/v5/services" + . "go.beyondstorage.io/v5/types" ) func TestFromString(t *testing.T) { diff --git a/tests/doc.go b/tests/doc.go index ec89949c9..0ab62f282 100644 --- a/tests/doc.go +++ b/tests/doc.go @@ -6,4 +6,4 @@ If the test failed, the generator SHOULD NOT be used in specific service. package tests -//go:generate go run -tags tools github.com/beyondstorage/go-storage/v4/cmd/definitions --debug service.toml +//go:generate go run -tags tools go.beyondstorage.io/v5/cmd/definitions --debug service.toml diff --git a/tests/generated.go b/tests/generated.go index 77b9c0ecb..8740bdd18 100644 --- a/tests/generated.go +++ b/tests/generated.go @@ -8,10 +8,10 @@ import ( "strings" "time" - . "github.com/beyondstorage/go-storage/v4/pairs" - "github.com/beyondstorage/go-storage/v4/pkg/httpclient" - "github.com/beyondstorage/go-storage/v4/services" - . "github.com/beyondstorage/go-storage/v4/types" + . "go.beyondstorage.io/v5/pairs" + "go.beyondstorage.io/v5/pkg/httpclient" + "go.beyondstorage.io/v5/services" + . "go.beyondstorage.io/v5/types" ) var ( diff --git a/tests/service.go b/tests/service.go index 39fe8f2e5..2b9911864 100644 --- a/tests/service.go +++ b/tests/service.go @@ -3,7 +3,7 @@ package tests import ( "context" - . "github.com/beyondstorage/go-storage/v4/types" + . "go.beyondstorage.io/v5/types" ) type Service struct { diff --git a/tests/storage.go b/tests/storage.go index 97e6272fa..450c82431 100644 --- a/tests/storage.go +++ b/tests/storage.go @@ -4,7 +4,7 @@ import ( "context" "io" - . "github.com/beyondstorage/go-storage/v4/types" + . "go.beyondstorage.io/v5/types" ) type Storage struct { diff --git a/tests/storager_bench_test.go b/tests/storager_bench_test.go index f7a43b6fc..5064f4227 100644 --- a/tests/storager_bench_test.go +++ b/tests/storager_bench_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/beyondstorage/go-storage/v4/types" + "go.beyondstorage.io/v5/types" ) func BenchmarkStorage_Stat(b *testing.B) { diff --git a/tests/utils.go b/tests/utils.go index 58aa5579d..5c7afb502 100644 --- a/tests/utils.go +++ b/tests/utils.go @@ -1,6 +1,6 @@ package tests -import typ "github.com/beyondstorage/go-storage/v4/types" +import typ "go.beyondstorage.io/v5/types" func (s *Service) formatError(op string, err error, args ...string) error { panic("not implemented")