Skip to content

Commit

Permalink
feat: Update import path (#38)
Browse files Browse the repository at this point in the history
* feat: Update import path

Signed-off-by: Xuanwo <[email protected]>

* Upgrade to go 1.16

Signed-off-by: Xuanwo <[email protected]>

* Update action

Signed-off-by: Xuanwo <[email protected]>
  • Loading branch information
Xuanwo authored Oct 27, 2021
1 parent b39df4e commit 6e342b9
Show file tree
Hide file tree
Showing 23 changed files with 190 additions and 173 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ jobs:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: "1.16"
go-version: "1.17"

- name: Checkout repository
uses: actions/checkout@v2

- name: Format
run: if [ "$(gofmt -l . | wc -l)" -gt 0 ]; then exit 1; fi
run: if [ "$(gofmt -l . | tee >&2 | wc -l)" -gt 0 ]; then exit 1; fi

- name: Build
run: make build

- name: Git Diff
run: if [ "$(git diff | wc -l)" -gt 0 ]; then exit 1; fi
run: if [ "$(git diff | tee >&2 | wc -l)" -gt 0 ]; then exit 1; fi
2 changes: 1 addition & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:

strategy:
matrix:
go: [ "1.15", "1.16" ]
go: [ "1.16", "1.17" ]
os: [ ubuntu-latest, windows-latest, macos-latest ]

steps:
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
- [Create ipfs Storager](new_ipfs.go) (InterPlanetary File System)
- [Create minio Storager](new_minio.go) (MinIO)
- [Create gdrive Storager](new_gdrive.go) (Google Drive)
- [Create obs Storager](new_obs.go) (Huawei Object Storage Service)
- [Create s3 Storager](new_s3.go) (Amazon S3)

## Basic Operations
Expand Down
4 changes: 2 additions & 2 deletions append.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"log"
"math/rand"

"github.com/beyondstorage/go-storage/v4/pkg/randbytes"
"github.com/beyondstorage/go-storage/v4/types"
"go.beyondstorage.io/v5/pkg/randbytes"
"go.beyondstorage.io/v5/types"
)

func AppendToNewFile(appender types.Appender, path string) {
Expand Down
25 changes: 12 additions & 13 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
module github.com/beyondstorage/go-storage-example
module go.beyondstorage.io/example

go 1.15
go 1.16

require (
github.com/beyondstorage/go-service-bos v1.0.0
github.com/beyondstorage/go-service-cos/v2 v2.3.0
github.com/beyondstorage/go-service-fs/v3 v3.5.0
github.com/beyondstorage/go-service-ftp v0.2.0
github.com/beyondstorage/go-service-gdrive v0.1.0
github.com/beyondstorage/go-service-hdfs v0.2.1
github.com/beyondstorage/go-service-ipfs v0.2.0
github.com/beyondstorage/go-service-minio v0.2.0
github.com/beyondstorage/go-service-obs v1.0.0
github.com/beyondstorage/go-service-s3/v2 v2.5.0
github.com/beyondstorage/go-storage/v4 v4.8.0
go.beyondstorage.io/services/bos/v2 v2.0.0
go.beyondstorage.io/services/cos/v3 v3.0.0
go.beyondstorage.io/services/fs/v4 v4.0.0
go.beyondstorage.io/services/ftp v0.3.0
go.beyondstorage.io/services/gdrive v0.2.0
go.beyondstorage.io/services/hdfs v0.3.0
go.beyondstorage.io/services/ipfs v0.3.0
go.beyondstorage.io/services/minio v0.3.0
go.beyondstorage.io/services/s3/v3 v3.0.1
go.beyondstorage.io/v5 v5.0.0
)
174 changes: 119 additions & 55 deletions go.sum

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions httpfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"io"
"log"

"github.com/beyondstorage/go-storage/v4/pkg/fswrap"
"github.com/beyondstorage/go-storage/v4/types"
"go.beyondstorage.io/v5/pkg/fswrap"
"go.beyondstorage.io/v5/types"
)

func HttpFSOpen(store types.Storager, path string) {
Expand Down
4 changes: 2 additions & 2 deletions iofs.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"io/ioutil"
"log"

"github.com/beyondstorage/go-storage/v4/pkg/fswrap"
"github.com/beyondstorage/go-storage/v4/types"
"go.beyondstorage.io/v5/pkg/fswrap"
"go.beyondstorage.io/v5/types"
)

func FSOpen(store types.Storager, path string) {
Expand Down
4 changes: 2 additions & 2 deletions list.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"errors"
"log"

"github.com/beyondstorage/go-storage/v4/pairs"
"github.com/beyondstorage/go-storage/v4/types"
"go.beyondstorage.io/v5/pairs"
"go.beyondstorage.io/v5/types"
)

func ListAll(store types.Storager) {
Expand Down
6 changes: 3 additions & 3 deletions multipart.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"log"
"math/rand"

"github.com/beyondstorage/go-storage/v4/pairs"
"github.com/beyondstorage/go-storage/v4/pkg/randbytes"
"github.com/beyondstorage/go-storage/v4/types"
"go.beyondstorage.io/v5/pairs"
"go.beyondstorage.io/v5/pkg/randbytes"
"go.beyondstorage.io/v5/types"
)

func Multipart(store types.Storager, path string) {
Expand Down
8 changes: 4 additions & 4 deletions new_bos.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"os"

bos "github.com/beyondstorage/go-service-bos"
"github.com/beyondstorage/go-storage/v4/pairs"
"github.com/beyondstorage/go-storage/v4/services"
"github.com/beyondstorage/go-storage/v4/types"
bos "go.beyondstorage.io/services/bos/v2"
"go.beyondstorage.io/v5/pairs"
"go.beyondstorage.io/v5/services"
"go.beyondstorage.io/v5/types"
)

func NewBos() (types.Storager, error) {
Expand Down
8 changes: 4 additions & 4 deletions new_cos.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"os"

cos "github.com/beyondstorage/go-service-cos/v2"
"github.com/beyondstorage/go-storage/v4/pairs"
"github.com/beyondstorage/go-storage/v4/services"
"github.com/beyondstorage/go-storage/v4/types"
cos "go.beyondstorage.io/services/cos/v3"
"go.beyondstorage.io/v5/pairs"
"go.beyondstorage.io/v5/services"
"go.beyondstorage.io/v5/types"
)

func NewCos() (types.Storager, error) {
Expand Down
8 changes: 4 additions & 4 deletions new_fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"os"

fs "github.com/beyondstorage/go-service-fs/v3"
"github.com/beyondstorage/go-storage/v4/pairs"
"github.com/beyondstorage/go-storage/v4/services"
"github.com/beyondstorage/go-storage/v4/types"
fs "go.beyondstorage.io/services/fs/v4"
"go.beyondstorage.io/v5/pairs"
"go.beyondstorage.io/v5/services"
"go.beyondstorage.io/v5/types"
)

func NewFs() (types.Storager, error) {
Expand Down
8 changes: 4 additions & 4 deletions new_ftp.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"os"

ftp "github.com/beyondstorage/go-service-ftp"
"github.com/beyondstorage/go-storage/v4/pairs"
"github.com/beyondstorage/go-storage/v4/services"
"github.com/beyondstorage/go-storage/v4/types"
ftp "go.beyondstorage.io/services/ftp"
"go.beyondstorage.io/v5/pairs"
"go.beyondstorage.io/v5/services"
"go.beyondstorage.io/v5/types"
)

func NewFTP() (types.Storager, error) {
Expand Down
8 changes: 4 additions & 4 deletions new_gdrive.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"os"

gdrive "github.com/beyondstorage/go-service-gdrive"
"github.com/beyondstorage/go-storage/v4/pairs"
"github.com/beyondstorage/go-storage/v4/services"
"github.com/beyondstorage/go-storage/v4/types"
gdrive "go.beyondstorage.io/services/gdrive"
"go.beyondstorage.io/v5/pairs"
"go.beyondstorage.io/v5/services"
"go.beyondstorage.io/v5/types"
)

func NewGdrive() (types.Storager, error) {
Expand Down
8 changes: 4 additions & 4 deletions new_hdfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"os"

hdfs "github.com/beyondstorage/go-service-hdfs"
"github.com/beyondstorage/go-storage/v4/pairs"
"github.com/beyondstorage/go-storage/v4/services"
"github.com/beyondstorage/go-storage/v4/types"
hdfs "go.beyondstorage.io/services/hdfs"
"go.beyondstorage.io/v5/pairs"
"go.beyondstorage.io/v5/services"
"go.beyondstorage.io/v5/types"
)

func NewHDFS() (types.Storager, error) {
Expand Down
8 changes: 4 additions & 4 deletions new_ipfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"os"

ipfs "github.com/beyondstorage/go-service-ipfs"
"github.com/beyondstorage/go-storage/v4/pairs"
"github.com/beyondstorage/go-storage/v4/services"
"github.com/beyondstorage/go-storage/v4/types"
ipfs "go.beyondstorage.io/services/ipfs"
"go.beyondstorage.io/v5/pairs"
"go.beyondstorage.io/v5/services"
"go.beyondstorage.io/v5/types"
)

func NewIPFS() (types.Storager, error) {
Expand Down
8 changes: 4 additions & 4 deletions new_minio.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"os"

minio "github.com/beyondstorage/go-service-minio"
"github.com/beyondstorage/go-storage/v4/pairs"
"github.com/beyondstorage/go-storage/v4/services"
"github.com/beyondstorage/go-storage/v4/types"
minio "go.beyondstorage.io/services/minio"
"go.beyondstorage.io/v5/pairs"
"go.beyondstorage.io/v5/services"
"go.beyondstorage.io/v5/types"
)

func NewMinio() (types.Storager, error) {
Expand Down
45 changes: 0 additions & 45 deletions new_obs.go

This file was deleted.

8 changes: 4 additions & 4 deletions new_s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"os"

s3 "github.com/beyondstorage/go-service-s3/v2"
"github.com/beyondstorage/go-storage/v4/pairs"
"github.com/beyondstorage/go-storage/v4/services"
"github.com/beyondstorage/go-storage/v4/types"
s3 "go.beyondstorage.io/services/s3/v3"
"go.beyondstorage.io/v5/pairs"
"go.beyondstorage.io/v5/services"
"go.beyondstorage.io/v5/types"
)

func NewS3() (types.Storager, error) {
Expand Down
4 changes: 2 additions & 2 deletions read.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"net/http"
"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"
)

func ReadWhole(store types.Storager, path string) {
Expand Down
6 changes: 3 additions & 3 deletions sse_s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"encoding/json"
"os"

s3 "github.com/beyondstorage/go-service-s3/v2"
"github.com/beyondstorage/go-storage/v4/pairs"
"github.com/beyondstorage/go-storage/v4/types"
s3 "go.beyondstorage.io/services/s3/v3"
"go.beyondstorage.io/v5/pairs"
"go.beyondstorage.io/v5/types"
)

func S3Pairs() []types.Pair {
Expand Down
6 changes: 3 additions & 3 deletions write.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (
"net/http"
"time"

"github.com/beyondstorage/go-storage/v4/pairs"
"github.com/beyondstorage/go-storage/v4/pkg/randbytes"
"github.com/beyondstorage/go-storage/v4/types"
"go.beyondstorage.io/v5/pairs"
"go.beyondstorage.io/v5/pkg/randbytes"
"go.beyondstorage.io/v5/types"
)

func WriteData(store types.Storager, path string) {
Expand Down

0 comments on commit 6e342b9

Please sign in to comment.