gpt4 book ai didi

thrift - 如何在Thrift IDL中编写 "javadoc"语句?

转载 作者:行者123 更新时间:2023-12-02 08:35:08 25 4
gpt4 key购买 nike

Thrift 有一个 html 生成器:

(thrift --help)

html (HTML):
standalone: Self-contained mode, includes all CSS in the HTML files.
Generates no style.css file, but HTML files will be larger.

如果像这样写一个struct

/**
* This is description of struct MyStruct
**/
struct MyStruct {
1: required i32 fieldOne = 2
}

运行 thrift --gen html 创建一个 html 页面,其中部分如下:

Struct MyStruct

|Key|Field |Type|Description|Requiredness|Default value|
|---|--------|----|-----------|------------|-------------|
|1 |fieldOne|i32 | |required |2 |

This is description of struct MyStruct

但是我没有找到如何填写description字段?

最佳答案

很好的问题,这很难猜测,而且没有很好的记录(是的,我很慷慨)。答案如下:

struct MyStruct {
/** This is how you add a description to a struct field */
1: required i32 fieldOne = 2
}

关于thrift - 如何在Thrift IDL中编写 "javadoc"语句?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37953865/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com