aboutsummaryrefslogtreecommitdiff
path: root/forged/internal/misc/back.go
blob: 5351359e1045678f0069bac7ac77d306acf59e9b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11

// SPDX-License-Identifier: AGPL-3.0-only
// SPDX-FileCopyrightText: Copyright (c) 2025 Runxi Yu <https://runxiyu.org>

package misc

// ErrorBack wraps a value and a channel for communicating an associated error.
// Typically used to get an error response after sending data across a channel.
type ErrorBack[T any] struct {
	Content   T
	ErrorChan chan error
}