utils

package
v0.0.0-...-860bb2b Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: MIT Imports: 13 Imported by: 22

Documentation

Index

Constants

This section is empty.

Variables

View Source
var HTMLSanitizer = bluemonday.UGCPolicy()

HTMLSanitizer HTML sanitizer

Functions

func AddFlashMessage

func AddFlashMessage(w http.ResponseWriter, req *http.Request, message string, mtype string) error

AddFlashMessage helper

func FormatPrice

func FormatPrice(price interface{}) string

func GetCurrentLocale

func GetCurrentLocale(req *http.Request) string

GetCurrentLocale get current locale from request

func GetCurrentUser

func GetCurrentUser(req *http.Request) *users.User

GetCurrentUser get current user from request

func GetDB

func GetDB(req *http.Request) *gorm.DB

GetDB get DB from request

func URLParam

func URLParam(name string, req *http.Request) string

URLParam get url params from request

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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