File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
internal/application/lark/handlers Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import (
1616 "github.com/BetaGoRobot/BetaGo-Redefine/pkg/logs"
1717 "github.com/BetaGoRobot/BetaGo-Redefine/pkg/utils"
1818 "github.com/BetaGoRobot/BetaGo-Redefine/pkg/xcommand"
19+ "github.com/BetaGoRobot/BetaGo-Redefine/pkg/xerror"
1920 "github.com/BetaGoRobot/BetaGo-Redefine/pkg/xhandler"
2021 larkcore "github.com/larksuite/oapi-sdk-go/v3/core"
2122 larkim "github.com/larksuite/oapi-sdk-go/v3/service/im/v1"
@@ -192,7 +193,7 @@ func (zhAStockHandler) ParseCLI(args []string) (ZhAStockArgs, error) {
192193 EndTime : argMap ["et" ],
193194 }
194195 if parsed .Code == "" {
195- return ZhAStockArgs {}, fmt .Errorf ("stock code is required" )
196+ return ZhAStockArgs {}, fmt .Errorf ("stock code is required: %w" , xerror . ErrArgsIncompelete )
196197 }
197198 if daysStr := argMap ["days" ]; daysStr != "" {
198199 days , err := strconv .Atoi (daysStr )
@@ -211,7 +212,7 @@ func (zhAStockHandler) ParseTool(raw string) (ZhAStockArgs, error) {
211212 return ZhAStockArgs {}, err
212213 }
213214 if parsed .Code == "" {
214- return ZhAStockArgs {}, fmt .Errorf ("stock code is required" )
215+ return ZhAStockArgs {}, fmt .Errorf ("stock code is required: %w" , xerror . ErrArgsIncompelete )
215216 }
216217 if parsed .Days <= 0 {
217218 parsed .Days = 1
You can’t perform that action at this time.
0 commit comments