go get -u github.com/ekhabarov/stp
Go struct from example/example.go
type SomeStruct struct {
ID int
Name string
Address string
Status string
}
command
stp -f $GOPATH/src/github.com/ekhabarov/stp/example/example.go -s SomeStruct
prints
message SomeStruct {
int id = 1;
string name = 2;
string address = 3;
string status = 4;
}
Usage of stp:
-f string
/path/to/file.go with structures
-s string
Structure name to parse