Rename 'gcs' to 'gs' for consistency
This commit is contained in:
@@ -16,7 +16,7 @@ import (
|
||||
|
||||
"github.com/benbjohnson/litestream"
|
||||
"github.com/benbjohnson/litestream/abs"
|
||||
"github.com/benbjohnson/litestream/gcs"
|
||||
"github.com/benbjohnson/litestream/gs"
|
||||
"github.com/benbjohnson/litestream/s3"
|
||||
"github.com/benbjohnson/litestream/sftp"
|
||||
)
|
||||
@@ -45,8 +45,8 @@ var (
|
||||
|
||||
// Google cloud storage settings
|
||||
var (
|
||||
gcsBucket = flag.String("gcs-bucket", os.Getenv("LITESTREAM_GCS_BUCKET"), "")
|
||||
gcsPath = flag.String("gcs-path", os.Getenv("LITESTREAM_GCS_PATH"), "")
|
||||
gsBucket = flag.String("gs-bucket", os.Getenv("LITESTREAM_GS_BUCKET"), "")
|
||||
gsPath = flag.String("gs-path", os.Getenv("LITESTREAM_GS_PATH"), "")
|
||||
)
|
||||
|
||||
// Azure blob storage settings
|
||||
@@ -480,8 +480,8 @@ func NewReplicaClient(tb testing.TB, typ string) litestream.ReplicaClient {
|
||||
return litestream.NewFileReplicaClient(tb.TempDir())
|
||||
case s3.ReplicaClientType:
|
||||
return NewS3ReplicaClient(tb)
|
||||
case gcs.ReplicaClientType:
|
||||
return NewGCSReplicaClient(tb)
|
||||
case gs.ReplicaClientType:
|
||||
return NewGSReplicaClient(tb)
|
||||
case abs.ReplicaClientType:
|
||||
return NewABSReplicaClient(tb)
|
||||
case sftp.ReplicaClientType:
|
||||
@@ -508,13 +508,13 @@ func NewS3ReplicaClient(tb testing.TB) *s3.ReplicaClient {
|
||||
return c
|
||||
}
|
||||
|
||||
// NewGCSReplicaClient returns a new client for integration testing.
|
||||
func NewGCSReplicaClient(tb testing.TB) *gcs.ReplicaClient {
|
||||
// NewGSReplicaClient returns a new client for integration testing.
|
||||
func NewGSReplicaClient(tb testing.TB) *gs.ReplicaClient {
|
||||
tb.Helper()
|
||||
|
||||
c := gcs.NewReplicaClient()
|
||||
c.Bucket = *gcsBucket
|
||||
c.Path = path.Join(*gcsPath, fmt.Sprintf("%016x", rand.Uint64()))
|
||||
c := gs.NewReplicaClient()
|
||||
c.Bucket = *gsBucket
|
||||
c.Path = path.Join(*gsPath, fmt.Sprintf("%016x", rand.Uint64()))
|
||||
return c
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user