style: shorten name operations to op

This commit is contained in:
Noah Hsu
2022-08-31 21:01:15 +08:00
parent 9ec6d5be7a
commit 7ac1d14eeb
35 changed files with 110 additions and 110 deletions

View File

@ -7,7 +7,7 @@ import (
"github.com/alist-org/alist/v3/internal/conf"
"github.com/alist-org/alist/v3/internal/errs"
"github.com/alist-org/alist/v3/internal/operations"
"github.com/alist-org/alist/v3/internal/op"
"github.com/alist-org/alist/v3/pkg/task"
"github.com/google/uuid"
"github.com/pkg/errors"
@ -15,7 +15,7 @@ import (
func AddURI(ctx context.Context, uri string, dstDirPath string) error {
// check storage
storage, dstDirActualPath, err := operations.GetStorageAndActualPath(dstDirPath)
storage, dstDirActualPath, err := op.GetStorageAndActualPath(dstDirPath)
if err != nil {
return errors.WithMessage(err, "failed get storage")
}
@ -24,7 +24,7 @@ func AddURI(ctx context.Context, uri string, dstDirPath string) error {
return errors.WithStack(errs.UploadNotSupported)
}
// check path is valid
obj, err := operations.Get(ctx, storage, dstDirActualPath)
obj, err := op.Get(ctx, storage, dstDirActualPath)
if err != nil {
if !errs.IsObjectNotFound(err) {
return errors.WithMessage(err, "failed get object")