All checks were successful
continuous-integration/drone/push Build is passing
Do not delete fields about a movie when we already have them Movie has no UserID field
20 lines
313 B
Go
20 lines
313 B
Go
package models
|
|
|
|
func updateIfNonEmpty(old *string, newValue string) {
|
|
if newValue != "" {
|
|
*old = newValue
|
|
}
|
|
}
|
|
|
|
func updateIfNonZeroInt(old *int, newValue int) {
|
|
if newValue != 0 {
|
|
*old = newValue
|
|
}
|
|
}
|
|
|
|
func updateIfNonZeroFloat(old *float32, newValue float32) {
|
|
if newValue != 0. {
|
|
*old = newValue
|
|
}
|
|
}
|