feat: 添加 MustWithData

This commit is contained in:
zhaoyupeng committed 2025-07-04 13:57:26 +08:00
1 parent 5df55a364d
commit 9c8460fc44
3 files changed
+14

No files matched your search

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