All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
19 lines
494 B
Go
19 lines
494 B
Go
package forms
|
|
|
|
type TestForm struct {
|
|
Name string `form:"test_name" validate:"required"`
|
|
Description string `form:"test_description"`
|
|
Hardware int `form:"test_hardware" validate:"required"`
|
|
BenchmarkProfiles []uint `form:"test_benchmarks" validate:"required"`
|
|
}
|
|
|
|
func (t *TestForm) IsBenchmarkSelected(checkID uint) bool {
|
|
for _, selectedID := range t.BenchmarkProfiles {
|
|
if checkID == selectedID {
|
|
return true
|
|
}
|
|
}
|
|
|
|
return false
|
|
}
|