18 lines
265 B
Go
18 lines
265 B
Go
package contexts
|
|
|
|
import "context"
|
|
|
|
func DevMode(ctx context.Context) DevInfo {
|
|
devmode, ok := ctx.Value(DevModeKey).(DevInfo)
|
|
if !ok {
|
|
return DevInfo{}
|
|
}
|
|
return devmode
|
|
}
|
|
|
|
type DevInfo struct {
|
|
WebsocketBase string
|
|
HTMXLog bool
|
|
StagingBanner bool
|
|
}
|