INNER CODE UNIT · Go

newCLIErrorWithDetails

geekjourneyx/md2wechat-skill · cmd/md2wechat/main.go:155

func newCLIErrorWithDetails(code, message string, details map[string]any, nextActions []string) error {
	return &cliError{Code: code, Message: message, Details: details, NextActions: nextActions}
}

func wrapCLIError(code string, err error, message string) error {
	return &cliError{Code: code, Message: message, Err: err}
}

func extractCLIError(err error) (*cliError, bool) {
	var cliErr *cliError
	if errors.As(err, &cliErr) {
		return cliErr, true
	}
	return nil, false
}

func addWechatAccountFlag(cmd *cobra.Command) {
	if cmd.Flags().Lookup("wechat-account") != nil {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…