From 99a5fe59fd9b826cce20214f043d1304808d7f9a Mon Sep 17 00:00:00 2001 From: nicoxiang <916592561@qq.com> Date: Wed, 27 Nov 2024 23:45:25 +0800 Subject: [PATCH] mark phone flag as deprecated --- cmd/root.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/root.go b/cmd/root.go index ad39eb4..a9c0133 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -69,6 +69,8 @@ func init() { defaultDownloadFolder := filepath.Join(userHomeDir, config.GeektimeDownloaderFolder) rootCmd.Flags().StringVarP(&phone, "phone", "u", "", "你的极客时间账号(手机号)") + rootCmd.Flags().MarkDeprecated("phone", "This flag is deprecated and will be removed in future versions. Please use '--gcid' and '--gcess' instead.") + rootCmd.Flags().MarkHidden("phone") rootCmd.Flags().StringVar(&gcid, "gcid", "", "极客时间 cookie 值 gcid") rootCmd.Flags().StringVar(&gcess, "gcess", "", "极客时间 cookie 值 gcess") rootCmd.Flags().StringVarP(&downloadFolder, "folder", "f", defaultDownloadFolder, "专栏和视频课的下载目标位置")