Compare commits
1 Commits
ea0fdee0e0
...
formular_a
Author | SHA1 | Date | |
---|---|---|---|
71bf8978ac |
6
main.go
6
main.go
@ -34,7 +34,7 @@ func main() {
|
|||||||
var b Briefing
|
var b Briefing
|
||||||
|
|
||||||
mux := http.NewServeMux()
|
mux := http.NewServeMux()
|
||||||
i, j = 1, 1
|
i = 1
|
||||||
|
|
||||||
mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static/"))))
|
mux.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static/"))))
|
||||||
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||||
@ -51,8 +51,7 @@ func main() {
|
|||||||
b.Time = r.PostFormValue("time")
|
b.Time = r.PostFormValue("time")
|
||||||
b.State = r.PostFormValue("state")
|
b.State = r.PostFormValue("state")
|
||||||
b.Location = r.PostFormValue("location")
|
b.Location = r.PostFormValue("location")
|
||||||
|
for j = 1; j <= i; j++ {
|
||||||
for ; j <= i; j++ {
|
|
||||||
b.Participants = append(b.Participants, Participant{
|
b.Participants = append(b.Participants, Participant{
|
||||||
ID: j,
|
ID: j,
|
||||||
Person: Person{
|
Person: Person{
|
||||||
@ -62,6 +61,7 @@ func main() {
|
|||||||
Company: r.PostFormValue(("participant-company-" + fmt.Sprint(j))),
|
Company: r.PostFormValue(("participant-company-" + fmt.Sprint(j))),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
fmt.Println(b)
|
||||||
})
|
})
|
||||||
|
|
||||||
log.Fatalln(http.ListenAndServe(":8080", mux))
|
log.Fatalln(http.ListenAndServe(":8080", mux))
|
||||||
|
Reference in New Issue
Block a user