Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ekhabarov/stp
Convert Go structures into Protobuf messages.
https://github.com/ekhabarov/stp
convertor generator go golang protobuf protocol-buffers
Last synced: 4 days ago
JSON representation
Convert Go structures into Protobuf messages.
- Host: GitHub
- URL: https://github.com/ekhabarov/stp
- Owner: ekhabarov
- Created: 2020-05-14T18:24:09.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-11-05T17:07:43.000Z (about 3 years ago)
- Last Synced: 2024-12-22T19:16:44.219Z (11 days ago)
- Topics: convertor, generator, go, golang, protobuf, protocol-buffers
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Convert Go structures into Protobuf messages.
## Installation
```shell
go get -u github.com/ekhabarov/stp
```## Example
Go struct from [example/example.go](./example/example.go)
```go
type SomeStruct struct {
ID int
Name string
Address string
Status string
}
```
command```shell
stp -f $GOPATH/src/github.com/ekhabarov/stp/example/example.go -s SomeStruct
```prints
```shell
message SomeStruct {
int id = 1;
string name = 2;
string address = 3;
string status = 4;
}
```## Usage
```shell
Usage of stp:
-f string
/path/to/file.go with structures
-s string
Structure name to parse
```