w3utils

package
v0.0.2-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: ISC Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger = libclog.NewLogger("W3", os.Stderr)

Feel free to modify libclog.Logger.SetLevel, libclog.Logger.UseSyslog & libclog.Logger.SetOutputMode.

Functions

func ContextStoreHolders

func ContextStoreHolders() uint

func GetFuncName

func GetFuncName(function any) string

GetFuncName returns the name of the function using reflection.

func GetName

func GetName(handler any) string

GetName attemps to get a human-readable name of the datatype using reflection.

func GetStructName

func GetStructName(rType reflect.Type) string

func IsStateModifyingMethod

func IsStateModifyingMethod(method string) bool

func LooseEqual

func LooseEqual(a, b any) bool

func SafeUint

func SafeUint(value int) uint

Types

type ContextHolder

type ContextHolder[T any] Holder[T]

Refer to AllocateContextStoreHolder and Holder.

func AllocateContextStoreHolder

func AllocateContextStoreHolder[T any]() ContextHolder[T]

Allocates a new item to be stored in [libw3.Context]. Use the returned ContextHolder in [libw3.Context.Get] & [libw3.Context.Set] methods.

type FileLike

type FileLike interface {
	io.Reader
	Name() string
	Close() error
}

type HasName

type HasName interface {
	Name() string
}

HasName represents types whose name are known without reflection.

type Holder

type Holder[T any] uint

Holder to a slice element (slice index where the held data is stored). One should always be obtained from somewhere, rather than casted manually.

type PageHolder

type PageHolder[T any] Holder[T]

Jump to

Keyboard shortcuts

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