Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Commit

Permalink
Add go:generate and move generated code to internal
Browse files Browse the repository at this point in the history
  • Loading branch information
prashantv committed Feb 2, 2017
1 parent 3e293e0 commit d8c9331
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 16 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions gen-go/meta/meta.go → internal/gen-go/meta/meta.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ func (c *tchanMetaClient) Health(ctx thrift.Context) (*HealthStatus, error) {
args := MetaHealthArgs{}
success, err := c.client.Call(ctx, c.thriftService, "health", &args, &resp)
if err == nil && !success {
switch {
default:
err = fmt.Errorf("received no result or unknown exception for health")
}
}

return resp.GetSuccess(), err
Expand All @@ -52,6 +56,10 @@ func (c *tchanMetaClient) ThriftIDL(ctx thrift.Context) (string, error) {
args := MetaThriftIDLArgs{}
success, err := c.client.Call(ctx, c.thriftService, "thriftIDL", &args, &resp)
if err == nil && !success {
switch {
default:
err = fmt.Errorf("received no result or unknown exception for thriftIDL")
}
}

return resp.GetSuccess(), err
Expand Down
14 changes: 7 additions & 7 deletions gen-go/meta/ttypes.go → internal/gen-go/meta/ttypes.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion tcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ import (
"strings"
"time"

"github.com/uber/tcheck/gen-go/meta"
"github.com/uber/tcheck/internal/gen-go/meta"

"github.com/uber/tchannel-go"
"github.com/uber/tchannel-go/thrift"
)

//go:generate thrift-gen --generateThrift --inputFile meta.thrift --outputDir ./internal/gen-go

const (
_serviceName = "tcheck"

Expand Down

0 comments on commit d8c9331

Please sign in to comment.