Nach Suchbegriff aus Datenbank lesen implementiert, außerdem structs mit new() instanziiert
This commit is contained in:
@ -23,7 +23,7 @@ func AddParticipant(i *int64) http.HandlerFunc {
|
||||
|
||||
func SubmitForm(ch chan<- *types.Briefing, i, j *int64) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var b types.Briefing
|
||||
b := new(types.Briefing)
|
||||
|
||||
b.FirstName = r.PostFormValue("instructor-first")
|
||||
b.LastName = r.PostFormValue("instructor-last")
|
||||
@ -44,6 +44,6 @@ func SubmitForm(ch chan<- *types.Briefing, i, j *int64) http.HandlerFunc {
|
||||
}
|
||||
|
||||
log.Println(b)
|
||||
ch <- &b
|
||||
ch <- b
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user