icmd

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package command provides a generic interface for handling commands.

It includes the `IHandler` interface for processing commands of any type and returning results of any type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IHandler

type IHandler[Command any, Result any] interface {

	// Handle processes the provided command and returns the result or an error.
	Handle(command Command) (Result, error)
}

IHandler defines a generic interface for handling commands.

Type Parameters: - Command: The type of the command to be handled. - Result: The type of the result returned after handling the command.

Jump to

Keyboard shortcuts

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