docs: formatting
This commit is contained in:
parent
493cc21d7e
commit
0004e1e57c
23
README.md
23
README.md
@ -19,6 +19,11 @@ message Foo {
|
|||||||
string bar = 1;
|
string bar = 1;
|
||||||
string zonk = 2;
|
string zonk = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message ExcludeThis {
|
||||||
|
string bar = 1;
|
||||||
|
string zonk = 2;
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
and creates this go code
|
and creates this go code
|
||||||
@ -57,15 +62,7 @@ func (x *Foo) Scan(value interface{}) error {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configuration
|
with this `buf.gen.yaml`
|
||||||
|
|
||||||
| Option | Meaning | Default |
|
|
||||||
| ------------------ | -------------------------------------------------------------------------------------- | ------- |
|
|
||||||
| `use_proto_names` | UseProtoNames uses proto field name instead of lowerCamelCase name in JSON field names | `true` |
|
|
||||||
| `emit_unpopulated` | EmitUnpopulated specifies whether to emit unpopulated fields | `true` |
|
|
||||||
| `exclude` | Takes a message identifier. Can be multiple identifier delimited by `,` | none |
|
|
||||||
|
|
||||||
### Example
|
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: v1
|
version: v1
|
||||||
@ -79,3 +76,11 @@ plugins:
|
|||||||
opt:
|
opt:
|
||||||
- paths=source_relative,use_proto_names=false,emit_unpopulated=true,exclude=git.wobcom.de/smartmetering/protoc-gen-go-value-scan/test/go/foo/v1.ExcludeThis
|
- paths=source_relative,use_proto_names=false,emit_unpopulated=true,exclude=git.wobcom.de/smartmetering/protoc-gen-go-value-scan/test/go/foo/v1.ExcludeThis
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
| Option | Meaning | Default |
|
||||||
|
| ------------------ | -------------------------------------------------------------------------------------- | ------- |
|
||||||
|
| `use_proto_names` | UseProtoNames uses proto field name instead of lowerCamelCase name in JSON field names | `true` |
|
||||||
|
| `emit_unpopulated` | EmitUnpopulated specifies whether to emit unpopulated fields | `true` |
|
||||||
|
| `exclude` | Takes a message identifier. Can be multiple identifier delimited by `,` | none |
|
||||||
|
Loading…
Reference in New Issue
Block a user