Code Room
Code reviewHardcr-g249
Subject Path traversalLevel Senior–Staff~30 minCommon in Code quality & review interviewsIndustries Software development

Question

Review this Go archive extractor.

What a strong answer looks like

Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.

Talk through your review
Code to reviewgo
func extract(zr *zip.Reader, dest string) error {	for _, f := range zr.File {		target := filepath.Join(dest, f.Name)		os.MkdirAll(filepath.Dir(target), 0755)		out, err := os.Create(target)		if err != nil { return err }		rc, _ := f.Open()		io.Copy(out, rc)		out.Close(); rc.Close()	}	return nil}
Run or narrate your approach, then ask the coach.