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,8 +120,12 @@ func CSVAdd(csv string, v int) string {
|
||||
if len(csv) == 0 {
|
||||
return strconv.Itoa(v)
|
||||
}
|
||||
if CSVContains(csv, v) {
|
||||
return csv
|
||||
} else {
|
||||
return csv + "," + strconv.Itoa(v)
|
||||
}
|
||||
}
|
||||
|
||||
func CSVRemove(csv string, v int) string {
|
||||
s := strings.Split(csv, ",")
|
||||
|
||||
Reference in New Issue
Block a user