Code Room
Code reviewMediumcr-g075
Subject PerformanceLevel Mid–Senior~20 minCommon in Code quality & review interviewsIndustries Software development

Question

Review this Go log-parsing function.

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 extractIDs(lines []string) []string {    var ids []string    for _, line := range lines {        re := regexp.MustCompile(`req_id=([a-f0-9]{16})`)        m := re.FindStringSubmatch(line)        if m != nil {            ids = append(ids, m[1])        }    }    return ids}
Run or narrate your approach, then ask the coach.