util

package
Version: v0.0.0-...-2095441 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 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.

Source Files

Jump to

Keyboard shortcuts

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