{"record":{"id":"fc5a0c67fab49a87","repo":"larksuite/cli","slug":"row-number-must-be-1-got-q","errorCode":null,"errorMessage":"row number must be >= 1 (got %q)","messagePattern":"row number must be >= 1 \\(got %q\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shortcuts/sheets/lark_sheet_sheet_structure.go","lineNumber":865,"sourceCode":"func parseA1Position(s string) (dimension string, idx int, err error) {\n\ts = strings.TrimSpace(s)\n\tif s == \"\" {\n\t\treturn \"\", 0, fmt.Errorf(\"position is empty\") //nolint:forbidigo // intermediate error; callers wrap it into a typed flag validation error\n\t}\n\tisDigits := true\n\tisLetters := true\n\tfor _, r := range s {\n\t\tif r < '0' || r > '9' {\n\t\t\tisDigits = false\n\t\t}\n\t\tif !((r >= 'A' && r <= 'Z') || (r >= 'a' && r <= 'z')) {\n\t\t\tisLetters = false\n\t\t}\n\t}\n\tif isDigits {\n\t\tn, _ := strconv.Atoi(s)\n\t\tif n <= 0 {\n\t\t\treturn \"\", 0, fmt.Errorf(\"row number must be >= 1 (got %q)\", s) //nolint:forbidigo // intermediate error; callers wrap it into a typed flag validation error\n\t\t}\n\t\treturn \"row\", n - 1, nil\n\t}\n\tif isLetters {\n\t\treturn \"column\", letterToColumnIndex(s), nil\n\t}\n\treturn \"\", 0, fmt.Errorf(\"expected pure digits (row number) or letters (column letter), got %q\", s) //nolint:forbidigo // intermediate error; callers wrap it into a typed flag validation error\n}\n\n// columnIndexToLetter converts a 0-based column index to the spreadsheet\n// letter notation (0 → \"A\", 25 → \"Z\", 26 → \"AA\", 701 → \"ZZ\", 702 → \"AAA\").\n// Used by +workbook helpers that need to format absolute column references.\nfunc columnIndexToLetter(idx int) string {\n\tif idx < 0 {\n\t\treturn \"\"\n\t}\n\tidx++\n\tvar out []byte","sourceCodeStart":847,"sourceCodeEnd":883,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/shortcuts/sheets/lark_sheet_sheet_structure.go#L847-L883","documentation":"Guard in parseA1Position: a digit-only position is zero or negative; A1 row numbers start at 1. Intermediate error wrapped by callers.","triggerScenarios":"Thrown at shortcuts/sheets/lark_sheet_sheet_structure.go:865 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use a row number >= 1"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7fd6ef3c07182257ce776cdc5a614e122d5bd4b3","analyzedAt":"2026-09-04T21:17:44.649Z","contentChangedAt":"2026-09-04T21:17:44.649Z","schemaVersion":2},"datasetVersion":"2026-09-12T02:17:10.037Z"}