From 1e2bcee3e7947536fe468b4d54340dd04ba75f46 Mon Sep 17 00:00:00 2001 From: tickstep Date: Sat, 26 Oct 2024 14:53:13 +0800 Subject: [PATCH] refactor share to share_web --- internal/command/{share.go => share_web.go} | 9 +++++---- main.go | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) rename internal/command/{share.go => share_web.go} (98%) diff --git a/internal/command/share.go b/internal/command/share_web.go similarity index 98% rename from internal/command/share.go rename to internal/command/share_web.go index 8f6c181..447051f 100644 --- a/internal/command/share.go +++ b/internal/command/share_web.go @@ -30,11 +30,12 @@ import ( "time" ) -func CmdShare() cli.Command { +// web端分享接口 +func CmdShareWeb() cli.Command { return cli.Command{ - Name: "share", + Name: "sharew", Usage: "分享文件/目录", - UsageText: cmder.App().Name + " share", + UsageText: cmder.App().Name + " sharew", Category: "阿里云盘", Before: ReloadConfigFunc, Action: func(c *cli.Context) error { @@ -286,7 +287,7 @@ func RunShareSet(modeFlag, driveId string, paths []string, expiredTime string, s fmt.Printf("链接:%s\n", r.ShareUrl) } else { // 分享 - r, err1 := panClient.WebapiPanClient().ShareLinkCreate(aliyunpan_web.ShareCreateParam{ + r, err1 := panClient.WebapiPanClient().ShareLinkCreate(aliyunpan.ShareCreateParam{ DriveId: driveId, SharePwd: sharePwd, Expiration: expiredTime, diff --git a/main.go b/main.go index 9160173..c327a05 100644 --- a/main.go +++ b/main.go @@ -710,7 +710,7 @@ func main() { command.CmdXcp(), // 分享文件/目录 share - command.CmdShare(), + command.CmdShareWeb(), // 保存分享文件/目录 save command.CmdSave(),