user

package
v0.0.0-...-3c1e77b Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(ctx context.Context, u *User) context.Context

NewContext returns a new Context that carries value u.

Types

type User

type User struct {
	Name string
}

func FromContext

func FromContext(ctx context.Context) (*User, bool)

FromContext returns the User value stored in ctx, if any.

Jump to

Keyboard shortcuts

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