Finishing the test/edit route
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
Some checks are pending
ci/woodpecker/push/woodpecker Pipeline is pending
This commit is contained in:
@@ -4,5 +4,15 @@ type TestForm struct {
|
||||
Name string `form:"test_name" validate:"required"`
|
||||
Description string `form:"test_description"`
|
||||
Hardware int `form:"test_hardware" validate:"required"`
|
||||
Benchmarks []string `form:"test_benchmarks" validate:"required"`
|
||||
Benchmarks []uint `form:"test_benchmarks" validate:"required"`
|
||||
}
|
||||
|
||||
func (t *TestForm) IsBenchmarkSelected(checkID uint) bool {
|
||||
for _, selectedID := range t.Benchmarks {
|
||||
if checkID == selectedID {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user