utils

package
v0.0.0-...-cc1fd88 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleError

func HandleError(ctx context.Context, err error, message string)

HandleError はエラーを処理し、追加情報を記録する関数です

func HandleErrorWithCaller

func HandleErrorWithCaller(ctx context.Context, err error, message string, caller int)

func IfThenElse

func IfThenElse[T any](condition bool, thenValue T, elseValue T) T

三項演算子

func LoadEnv

func LoadEnv() error

func StringToOptString

func StringToOptString(s *string) oas.OptString

ogen用のユーティリティ関数

func ToOpt

func ToOpt[O any](v any) O

func ToOptNil

func ToOptNil[O any](v any) O

func ToPtrIfNotNullFunc

func ToPtrIfNotNullFunc[T any](nullFlag bool, getValue func() *T) *T

func ToPtrIfNotNullValue

func ToPtrIfNotNullValue[T any](nullFlag bool, value T) *T

Types

type ErrorInfo

type ErrorInfo struct {
	Err      error
	File     string
	Line     int
	Function string
}

ErrorInfo はエラーに関する追加情報を保持する構造体です

Jump to

Keyboard shortcuts

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