mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 23:44:52 +01:00
prevent CSVs from adding existing values
This commit is contained in:
@@ -120,7 +120,11 @@ func CSVAdd(csv string, v int) string {
|
|||||||
if len(csv) == 0 {
|
if len(csv) == 0 {
|
||||||
return strconv.Itoa(v)
|
return strconv.Itoa(v)
|
||||||
}
|
}
|
||||||
return csv + "," + strconv.Itoa(v)
|
if CSVContains(csv, v) {
|
||||||
|
return csv
|
||||||
|
} else {
|
||||||
|
return csv + "," + strconv.Itoa(v)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func CSVRemove(csv string, v int) string {
|
func CSVRemove(csv string, v int) string {
|
||||||
|
|||||||
Reference in New Issue
Block a user