Help us shape the future of Go! Take the 2026 Go Developer Survey

event

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(eventName string, handler Handler)

func Trigger

func Trigger(eventName string, data interface{}) (any, error)

Types

type Event

type Event struct {
	Name string
	Data any
}

type Handler

type Handler func(e Event) (any, error)

type IEvent added in v1.0.1

type IEvent interface {
	Register()
}

Jump to

Keyboard shortcuts

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