Function
UpdateAbilityByTag
(tag string, newTag *string, priority *int64, weight *uint)
Source from the content-addressed store, hash-verified
| 299 | } |
| 300 | |
| 301 | func UpdateAbilityByTag(tag string, newTag *string, priority *int64, weight *uint) error { |
| 302 | ability := Ability{} |
| 303 | if newTag != nil { |
| 304 | ability.Tag = newTag |
| 305 | } |
| 306 | if priority != nil { |
| 307 | ability.Priority = priority |
| 308 | } |
| 309 | if weight != nil { |
| 310 | ability.Weight = *weight |
| 311 | } |
| 312 | return DB.Model(&Ability{}).Where("tag = ?", tag).Updates(ability).Error |
| 313 | } |
| 314 | |
| 315 | var fixLock = sync.Mutex{} |
| 316 | |
Tested by
no test coverage detected