Skip to content

strconv: ParseBool should also accept "on" #21932

@kristoffer-ingemansson

Description

@kristoffer-ingemansson

HTML forms submit checkboxes as "on" when checked.
I think that strconv.ParseBool should return true for input str "on" as it would make parsing form data much easier.

https://github.com/golang/go/blob/release-branch.go1.9/src/strconv/atob.go#L12

I'm using: Go 1.8 on Windows

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions