moved packages out of pkg
This commit is contained in:
16
internal/contexts/devmode.go
Normal file
16
internal/contexts/devmode.go
Normal file
@@ -0,0 +1,16 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user