/
githubmirror
/
photoprism
Обзор
Документация
Войти
/
githubmirror
/
photoprism
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
develop
internal/form/feedback.go
25 строк
724 B
Michael Mayer
Go: Apply go fix modernizations across backend packages
20 фев 2026, 05:54
20 фев 2026, 05:54
a2b7615
Код
Авторство
О чём код?
package form import "github.com/ulule/deepcopier" // Feedback represents support requests / customer feedback. type Feedback struct { Category string `json:"Category"` Message string `json:"Message"` UserName string `json:"UserName"` UserEmail string `json:"UserEmail"` UserAgent string `json:"UserAgent"` UserLocales string `json:"UserLocales"` } // Empty reports whether the feedback form lacks required content. func (f Feedback) Empty() bool { return len(f.Category) < 1 || len(f.Message) < 3 || len(f.UserEmail) < 5 } // NewFeedback copies values from an arbitrary model into a Feedback form. func NewFeedback(m any) (f Feedback, err error) { err = deepcopier.Copy(m).To(&f) return f, err }