Help us shape the future of Go! Take the 2026 Go Developer Survey

testhooks

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package testhooks holds switches that only test helpers flip, to make expensive work cheap in tests. Production code never sets them, and sites cannot reach them: the package is internal and only sitetest imports it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheapPasswords

func CheapPasswords() bool

CheapPasswords reports whether UseCheapPasswords was called.

func UseCheapPasswords

func UseCheapPasswords()

UseCheapPasswords makes auth hash passwords with the smallest argon2id cost instead of the production cost of about 70ms and 64 MiB per hash. Every site a test starts hashes and checks its admin's password, so this saves seconds per test package. Call it before the first password is hashed: hashes made with one cost do not verify with the other.

Types

This section is empty.

Jump to

Keyboard shortcuts

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