form

command
v0.0.0-...-d51f5ae Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 9 Imported by: 0

README

How to handle form in Go?

  • Handling form in Go.
  • Validating values in form: for better security.
  • Using HTMLEscape to avoid XXS attack.
  • How to avoid submitting the form twice? -> A unique token for each form (e.g., Timestamp encoded with MD5)
  • Upload file with form.

Usage

  • Spin up the server.
$ go run main.go
  • Go to the signup page (http://localhost:9090/signup) and signup.
  • Expected outcome
    • You will see your username, password, and email displayed on the status page.
    • You will see the photo you uploaded on your local server.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL