util

package
v0.0.0-...-4feb759 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderError

func RenderError(w http.ResponseWriter, r *http.Request, statusCode int, message string)

RenderError renders the error template with the specified error.

Types

type StringMap

type StringMap map[string]interface{}

StringMap provides a convenient interface for a map that uses strings for keys and stores interface{} values.

func (StringMap) Difference

func (s StringMap) Difference(other StringMap) StringMap

Difference returns a map of the items that are in this map but not another.

func (StringMap) Has

func (s StringMap) Has(k string) bool

Has checks for the provided value in the map.

func (StringMap) Insert

func (s StringMap) Insert(k string, v interface{})

Insert adds a key to the map and sets its value to the one provided.

func (StringMap) Remove

func (s StringMap) Remove(k string)

Remove removes a value from the map.

Jump to

Keyboard shortcuts

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