{"record":{"id":"14faf452f148fd51","repo":"larksuite/cli","slug":"range-is-empty","errorCode":null,"errorMessage":"range is empty","messagePattern":"range is empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"shortcuts/sheets/lark_sheet_sheet_structure.go","lineNumber":818,"sourceCode":"\t}\n\tif op == \"group\" {\n\t\tif gs := runtime.Str(\"group-state\"); gs != \"\" {\n\t\t\tinput[\"group_state\"] = gs\n\t\t}\n\t}\n\treturn input, nil\n}\n\n// ─── A1 parsing helpers ───────────────────────────────────────────────\n\n// parseA1Range parses an A1 closed range (\"3:7\" / \"5\" / \"C:F\" / \"C\") into\n// the inferred dimension (\"row\" or \"column\") and 0-based inclusive indices.\n// Single-element form yields startIdx == endIdx. Mixing digits and letters\n// across the two sides (\"3:C\") is rejected.\nfunc parseA1Range(s string) (dimension string, startIdx, endIdx int, err error) {\n\ts = strings.TrimSpace(s)\n\tif s == \"\" {\n\t\treturn \"\", 0, 0, fmt.Errorf(\"range is empty\") //nolint:forbidigo // intermediate error; callers wrap it into a typed flag validation error\n\t}\n\tparts := strings.Split(s, \":\")\n\tif len(parts) > 2 {\n\t\treturn \"\", 0, 0, fmt.Errorf(\"expected \\\"start:end\\\" or single element\") //nolint:forbidigo // intermediate error; callers wrap it into a typed flag validation error\n\t}\n\tdim1, idx1, err := parseA1Position(parts[0])\n\tif err != nil {\n\t\treturn \"\", 0, 0, err\n\t}\n\tif len(parts) == 1 {\n\t\treturn dim1, idx1, idx1, nil\n\t}\n\tdim2, idx2, err := parseA1Position(parts[1])\n\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","sourceCodeStart":800,"sourceCodeEnd":836,"githubUrl":"https://github.com/larksuite/cli/blob/7fd6ef3c07182257ce776cdc5a614e122d5bd4b3/shortcuts/sheets/lark_sheet_sheet_structure.go#L800-L836","documentation":"Guard in parseA1Range: the range input is empty or whitespace-only, so no A1 range can be parsed. Intermediate error; callers wrap into a typed flag validation error.","triggerScenarios":"Thrown at shortcuts/sheets/lark_sheet_sheet_structure.go:818 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a range like 3:7, 5, C:F, or C"],"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"}