Open alingse opened 8 months ago
nums := make([]int, 0) for _, num := range nums { }
id := 1 if id > 0 { strconv.FormatInt(id, 10) }
the result from pure function FormatInt is unused
for _, n := range ns { if n > 0 { rs = append(rs, ns...) } }
if n == 1 { } else if n == 2 { } else if n == 3 { } else { }
for _, n := range ns { ... if n > 0 { ... continue } }
1. iter over zero
2. unused result from pure function
the result from pure function FormatInt is unused
3. append all data when range it
4. if-else-if vs switch
5. useless continue