v12.2.5 Latest Latest

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

Go to latest
Published: Aug 21, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0



Package main shows how to use a dependency to check if a user is logged in using a special custom Go type `Authenticated`, which when, present on a controller's method or a field then it limits the visibility to "authenticated" users only.

The same result could be done through a middleware as well, however using a static type any person reads your code can see that an "X" controller or method should only be used by "authenticated" users.

Jump to

Keyboard shortcuts

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