feat: 添加 MustWithData

This commit is contained in:
zhaoyupeng
2025-07-04 13:57:26 +08:00
parent 5df55a364d
commit 9c8460fc44
3 changed files with 14 additions and 0 deletions

View File

@ -11,3 +11,8 @@ func Must(errs ...error) {
}
}
}
func MustWithData[T any](data T, err error) T {
Must(err)
return data
}