{"record":{"id":"8ed69e9b8fcc7096","repo":"larksuite/cli","slug":"position-is-empty","errorCode":null,"errorMessage":"position is empty","messagePattern":"position is empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shortcuts/sheets/lark_sheet_sheet_structure.go","lineNumber":850,"sourceCode":"\tif err != nil {\n\t\treturn \"\", 0, 0, err\n\t}\n\tif dim1 != dim2 {\n\t\treturn \"\", 0, 0, fmt.Errorf(\"cannot mix row (digits) and column (letters) in one range\") //nolint:forbidigo // intermediate error; callers wrap it into a typed flag validation error\n\t}\n\tif idx2 < idx1 {\n\t\treturn \"\", 0, 0, fmt.Errorf(\"end position is before start\") //nolint:forbidigo // intermediate error; callers wrap it into a typed flag validation error\n\t}\n\treturn dim1, idx1, idx2, nil\n}\n\n// parseA1Position parses a single A1 position element: pure digits → row\n// (1-based number, returned as 0-based idx); pure letters → column (letters\n// case-insensitive, \"A\" → 0, \"AA\" → 26).\nfunc 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}","sourceCodeStart":832,"sourceCodeEnd":868,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/shortcuts/sheets/lark_sheet_sheet_structure.go#L832-L868","documentation":"Guard in parseA1Position: the position element is empty or whitespace-only, so no row/column can be derived. Intermediate error wrapped by callers.","triggerScenarios":"Thrown at shortcuts/sheets/lark_sheet_sheet_structure.go:850 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Supply both sides of the range or drop the colon"],"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"}