util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteCookie

func DeleteCookie(w http.ResponseWriter, r *http.Request, name string)

DeleteCookie deletes a cookie with the specified name.

func RandBytes

func RandBytes(n int) []byte

RandBytes generates a random byte slice of the given length.

func RandString

func RandString(n int) string

RandString generates a random string of the given length.

Reference: https://stackoverflow.com/a/31832326/124898

func SetCookie

func SetCookie(w http.ResponseWriter, r *http.Request, name, value string)

SetCookie sets a cookie with the specified name and value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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