newsbot-portal/internal/views/layout/util.go

14 lines
247 B
Go
Raw Normal View History

package layout
import (
"context"
"git.jamestombleson.com/jtom38/newsbot-portal/internal/domain"
)
func getUsername(ctx context.Context) string {
if theme, ok := ctx.Value(domain.UserNameContext).(string); ok {
return theme
}
return ""
}