langs

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: May 31, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IfElse added in v0.11.2

func IfElse[T any](cond bool, v1, v2 T) T

func Must

func Must[T any](v T, err error) T

func MustParseNonce

func MustParseNonce(nonce string) byte

func NewNonce

func NewNonce() string

Types

type Data

type Data[T any] struct {
	Error
	Data T `json:"data"`
}

func (Data[T]) MarshalTo

func (d Data[T]) MarshalTo(w io.Writer)

type Error

type Error struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
}

func Err

func Err(err error) Error

func (Error) Error

func (e Error) Error() string

func (Error) MarshalTo

func (e Error) MarshalTo(w io.Writer)

func (Error) Wrap

func (e Error) Wrap(err error) Error

Jump to

Keyboard shortcuts

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