{"record":{"id":"6a21a8ff9bb4e8a7","repo":"yorukot/superfile","slug":"failed-to-calculate-md5-checksum-w","errorCode":null,"errorMessage":"failed to calculate MD5 checksum: %w","messagePattern":"failed to calculate MD5 checksum: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/internal/ui/metadata/utils.go","lineNumber":65,"sourceCode":"}\n\nfunc computeRenderDimensions(metadata [][2]string, viewWidth int) (int, int) {\n\t// Compute dimension based values\n\tmaxKeyLen := getMaxKeyLength(metadata)\n\treturn computeMetadataWidths(viewWidth, maxKeyLen)\n}\n\n// TODO : Unit test this\nfunc calculateMD5Checksum(filePath string) (string, error) {\n\tfile, err := os.Open(filePath)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to open file: %w\", err)\n\t}\n\tdefer file.Close()\n\n\thash := md5.New() //nolint:gosec // MD5 is sufficient for file integrity display, not used for security\n\tif _, err := io.Copy(hash, file); err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to calculate MD5 checksum: %w\", err)\n\t}\n\n\tchecksum := hex.EncodeToString(hash.Sum(nil))\n\treturn checksum, nil\n}\n","sourceCodeStart":47,"sourceCodeEnd":71,"githubUrl":"https://github.com/yorukot/superfile/blob/b72f550bc6e75913f48eb49fdd258e1a2df2fe88/src/internal/ui/metadata/utils.go#L47-L71","documentation":"Error \"failed to calculate MD5 checksum: %w\" thrown in yorukot/superfile.","triggerScenarios":"Thrown at src/internal/ui/metadata/utils.go:65 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b72f550bc6e75913f48eb49fdd258e1a2df2fe88","analyzedAt":"2026-09-01T04:38:08.254Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}