8000 GitHub - ekhabarov/stp: Convert Go structures into Protobuf messages.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
/ stp Public

Convert Go structures into Protobuf messages.

Notifications You must be signed in to change notification settings

ekhabarov/stp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Convert Go structures into Protobuf messages.

Installation

go get -u github.com/ekhabarov/stp

Example

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

Usage of stp:
  -f string
    /path/to/file.go with structures
  -s string
    Structure name to parse

Releases

No releases published

Packages

No packages published

Languages

0