FAQ
http://godoc.usr.cc/net/http#Request.FormValue

     FormValue returns the first value for the named component of the
     query. POST and PUT body parameters take precedence over URL query
     string values. FormValue calls ParseMultipartForm and ParseForm if
     necessary. To access multiple values of the same key use ParseForm.

What I am confused about is:
what happens when no such formvalue is posted or put? does it return a
nil string or something else? Why isn't there a error tag returned?

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Gary b at May 20, 2013 at 3:13 pm

    On Monday, May 20, 2013 7:00:29 AM UTC-7, Dean Sinaean wrote:

    what happens when no such formvalue is posted or put? does it return a nil
    string or something else?
    The FormValue method returns "" when no value is present. Use the
    Request.Form <http://godoc.org/net/http#Request.Form> map directly to
    detect the difference between no value and "".

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMay 20, '13 at 2:00p
activeMay 20, '13 at 3:13p
posts2
users2
websitegolang.org

2 users in discussion

Dean Sinaean: 1 post Gary b: 1 post

People

Translate

site design / logo © 2021 Grokbase