params

package
v0.0.0-...-6fe4f4e Latest Latest
Warning

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

Go to latest
Published: May 11, 2024 License: MIT Imports: 6 Imported by: 0

README

Exercise 12.12 (P350)

Extend the field tag notation to express parameter validity requirements. For example, a string might need to be a valid email address or credit-card number, and an integer might need to be a valid US ZIP code. Modify Unpack to check these requirements.

Documentation

Overview

Package params provides a reflection-based parser for URL parameters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pack

func Pack(ptr interface{}) (url.URL, error)

func Unpack

func Unpack(req *http.Request, ptr interface{}) error

Unpack populates the fields of the struct pointed to by ptr from the HTTP request parameters in req.

Types

type Check

type Check func(v interface{}) error

Jump to

Keyboard shortcuts

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