big merge

This commit is contained in:
Philippe G
2021-12-18 21:04:23 -08:00
parent 955692f8ad
commit 898998efb0
583 changed files with 84472 additions and 1965 deletions

View File

@@ -0,0 +1,34 @@
package main
import (
"io/ioutil"
"log"
"os"
"github.com/celer-network/pb3-gen-sol/generator"
"google.golang.org/protobuf/proto"
)
func main() {
c := NewCorntext()
data, err := ioutil.ReadAll(os.Stdin)
if err != nil {
generator.Error(err, "reading input")
}
if err := proto.Unmarshal(data, c.Request); err != nil {
generator.Error(err, "parsing input proto")
}
c.buildAllTypes()
c.outputTypes()
// Send back the results.
data, err = proto.Marshal(c.Response)
if err != nil {
log.Fatal(err, "failed to marshal output proto")
}
_, err = os.Stdout.Write(data)
if err != nil {
log.Fatal(err, "failed to write output proto")
}
}