package component import "github.com/rjNemo/rentease/config" type RequestBookingViewModel struct { Item string From string To string Name string PhoneNumber string Email string Errors []string } func makeItems() []string { host := config.NewHost() items := make([]string, 0, 2) for _, i := range host.Items { if i.Name == "T2" || i.Name == "T3" { items = append(items, i.Name) } } return items } var items = makeItems() func (rbvm RequestBookingViewModel) invalidTimeRange() bool { for _, e := range rbvm.Errors { if e == "invalid_time_range" { return true } } return false } func (rbvm RequestBookingViewModel) missingCommunicationMethod() bool { for _, e := range rbvm.Errors { if e == "missing_communication_method" { return true } } return false } templ RequestBookingForm(rbvm *RequestBookingViewModel) {
}