utils

package
v0.1.5-alpha Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 0 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAs

func GetAs[T any](obj any) (T, bool)

GetAs returns `obj` as type `T`. Uses Golang built-in type assertion.

func Implements

func Implements[T any](obj any) bool

Implements returns whether `obj` implements `T`. Uses Golang built-in type assertion.

func MustGetAs

func MustGetAs[T any](obj any) T

MustGetAs returns `obj` as type `T`. Will panic if `obj` is not of type `T`. Uses Golang built-in type assertion.

Types

This section is empty.

Jump to

Keyboard shortcuts

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