mirror of
https://github.com/chai2010/advanced-go-programming-book.git
synced 2025-05-30 00:32:21 +00:00
update
This commit is contained in:
parent
b271ea6c98
commit
bb5e132633
@ -117,7 +117,7 @@ type FeatureSetParams struct {
|
||||
|
||||
当然这种思路并不是唯一选择,我们还可以通过解析 thrift 的 IDL,生成一套 http 接口的 struct。如果你选择这么做,那整个流程就变成了这样:
|
||||
|
||||

|
||||

|
||||
|
||||
看起来比之前的图顺畅一点,不过如果你选择了这么做,你需要自行对 thrift 的 IDL 进行解析,也就是相当于可能要手写一个 thrift 的 IDL 的 parser,虽然现在有 antlr 或者 peg 能帮你简化这些 parser 的书写工作,但在“解析”的这一步我们不希望引入太多的工作量,所以量力而行即可。
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user