RemoveById removes a single field by its id. This method does nothing if field with the specified id doesn't exist.
(fieldId string)
| 84 | // |
| 85 | // This method does nothing if field with the specified id doesn't exist. |
| 86 | func (l *FieldsList) RemoveById(fieldId string) { |
| 87 | fields := *l |
| 88 | for i, field := range fields { |
| 89 | if field.GetId() == fieldId { |
| 90 | *l = append(fields[:i], fields[i+1:]...) |
| 91 | return |
| 92 | } |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | // RemoveByName removes a single field by its name. |
| 97 | // |