On the tmpl document page, there is a form:
<form id="createform" name="createform" action="/clickCreateRashod" method="post"> <div class="col-lg-6"> <input id="first" name="first" value="Name1"> <input id="first" name="first" value="Name2"> <input id="first" name="first" value="Name3"> <input id="two" name="two" value="5"> <button type="submit" class="btn" >Add</button> </form> So here's how I get the values of all three "first" functions in gin: Handler function:
r.POST("/clickCreateRashod", clickCreateRashodHandle) func clickCreateRashodHandle(c *gin.Context) { //Тут я писал уже кучу всего, как сделать правильно? } For a single c.PostForm ("first") value, how to read everything into an array? You can also give an example from the standard library.