internal

package
v2.0.0-alpha.63 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowCookie

func AllowCookie(yesno bool)

For security reason, cookie is not allowed by default, you can control the use of cookie via AllowCookie(), however.

func ApiPanicHandler

func ApiPanicHandler(w http.ResponseWriter, err any)

func GetGlobalCORS

func GetGlobalCORS() (bool, []string)

func IsCookieAllowed

func IsCookieAllowed() bool

func Key

func Key(key string) string

standardize keys

func LogPanic

func LogPanic(mesg string, trace []string)

func MatchPreferredLanguage

func MatchPreferredLanguage(r *http.Request) *message.Printer

func RawPanicHandler

func RawPanicHandler(w http.ResponseWriter, err any)

func Segment

func Segment(text string) []string

func SetGlobalCORS

func SetGlobalCORS(enable bool, origin ...string)

func WithLangSpecifier

func WithLangSpecifier(lang string)

func WithPanicLogger

func WithPanicLogger(h func(string, []string))

Types

type PanicHandler

type PanicHandler func(http.ResponseWriter, any)

Jump to

Keyboard shortcuts

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