github.com/batchcorp/thrift-iterator@v0.0.0-20220918180557-4c4a158fc6e9/test/api/init.go (about)

     1  package test
     2  
     3  import (
     4  	"github.com/v2pro/wombat/generic"
     5  	"github.com/batchcorp/thrift-iterator"
     6  	"github.com/batchcorp/thrift-iterator/test/api/binding_test"
     7  )
     8  
     9  var api = thrifter.Config{
    10  	Protocol: thrifter.ProtocolBinary,
    11  }.Froze()
    12  
    13  //go:generate go install github.com/batchcorp/thrift-iterator/cmd/thrifter
    14  //go:generate $GOPATH/bin/thrifter -pkg github.com/batchcorp/thrift-iterator/test/api
    15  func init() {
    16  	generic.Declare(func() {
    17  		api.WillDecodeFromBuffer(
    18  			(*binding_test.TestObject)(nil),
    19  		)
    20  	})
    21  }