(ext string)
| 472 | } |
| 473 | |
| 474 | func ValidApplicationImageExt(ext string) bool { |
| 475 | switch strings.ToLower(ext) { |
| 476 | case ".gif", ".png", ".jpg", ".jpeg": |
| 477 | return true |
| 478 | default: |
| 479 | return false |
| 480 | } |
| 481 | } |
| 482 | |
| 483 | func handleApplicationError(ctx *gin.Context, err error) { |
| 484 | if errors.Is(err, gorm.ErrDuplicatedKey) { |
no outgoing calls
no test coverage detected
searching dependent graphs…