songjiachao commented on code in PR #323:
URL: https://github.com/apache/dubbo-js/pull/323#discussion_r1035840322
##########
packages/dubbo-serialization/src/proto.ts:
##########
@@ -0,0 +1,64 @@
+import fs from 'fs'
+import path from 'path'
+import _ from 'lodash'
+import { loadSync, Root, Type } from 'protobufjs'
+
+let _proto: Root | undefined = undefined
+
+/**
+ * 加载所有的proto文件
+ * @param dir 文件路径
+ * @returns Root namespace
+ */
+function loadProto(dir: string) {
+ const files = fs.readdirSync(dir)
Review Comment:
使用glob库
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]