Skip to content

Commit

Permalink
doc: add inline
Browse files Browse the repository at this point in the history
  • Loading branch information
hui.wang committed Feb 21, 2022
1 parent db12004 commit c7789b6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ func XXXXXXOptionDeclareWithDefault() interface{} {
- 如上例指定`writeTimeout`的arg,则生成的New方法为:`NewETCD(writeTimeout time.Duration, opts ...ETCDOption) `
- 允许设定多个arg,指定参数的index即可,index不可重复
- `xconf`,自定义xconf标签
- `inline`,将字段inline
- `getter`,生成的Get接口返回值类型,默认为定义时指定的类型,可通过该方式指定返回类型对应的接口,如上例中`Redis`的访问接口返回为:`RedisVisitor`
- `option`, 指定该字段生成的option方法名称,覆盖`--option_prefix``--option_with_struct_name`规则,
- `deprecated`,字符串,指定字段为deprecated,在Option以及Get方法上都会生成`//Deprecated`注释,如果启用了xconf支持,会一并在xconf标签中生成deprecated支持。

0 comments on commit c7789b6

Please sign in to comment.