The Request struct of the net/http package contains the Form field which contains the POST form variables and URL query variables merged. The important step in the preceding code is the call of the ParseForm method on the Request pointer. This method call causes the parsing of the POST form values and query values into a Form variable. Note that if the Get method on the Form field is used, the POST value of the parameter is prioritized. The Form and PostForm fields are, in fact, of type url.Values.
If only the parameters from the POST form need to be accessed, the PostForm field of the Request is provided. This one keeps only those that were part of the POST body.