Documentation
¶
Overview ¶
Package etag creates HTTP entity tags, a port of the npm "etag" package.
A strong tag is formatted as "<hex-len>-<base64-sha1>" where the base64 of the SHA-1 digest is truncated to 27 characters. A stat-based tag is formatted as "<hex-size>-<hex-mtime-ms>". Weak tags are prefixed with "W/".
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
Generate computes an entity tag for the given content. When weak is true the tag is prefixed with "W/".
func GenerateStat ¶
GenerateStat computes a stat-based entity tag from a resource's size and modification time. The modification time is expressed in milliseconds since the Unix epoch. When weak is true the tag is prefixed with "W/".
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.