diff --git a/Makefile b/Makefile index 3a703aa87..daf463e10 100644 --- a/Makefile +++ b/Makefile @@ -81,7 +81,7 @@ cyclo-check: lint: check-licence eclint-check @rm -f lint.log @echo "Checking formatting..." - @gofmt -d -s $(PKG_FILES) 2>&1 | $(FILTER_LINT) | tee -a lint.log + @$(GOIMPORTS)/goimports -d $(PKG_FILES) 2>&1 | $(FILTER_LINT) | tee -a lint.log @echo "Installing test dependencies for vet..." @go test -i $(PKGS) @echo "Checking printf statements..." @@ -115,7 +115,7 @@ generate: @$(GOBINDATA)/go-bindata -pkg config -nocompress -modtime 1 -prefix config -o config/production.gen.go $(ENV_CONFIG) @./node_modules/.bin/uber-licence --file "production.gen.go" --dir "config" > /dev/null @$(GOBINDATA)/go-bindata -pkg templates -nocompress -modtime 1 -prefix codegen/templates -o codegen/template_bundle/template_files.go codegen/templates/... - @gofmt -w -e -s "codegen/template_bundle/template_files.go" + @$(GOIMPORTS)/goimports -w -e "codegen/template_bundle/template_files.go" @PATH=$(GOGOSLICK):$(YARPCGO):$(GOIMPORTS):$(GOMOCK):$(PATH) bash ./scripts/generate.sh .PHONY: check-generate diff --git a/codegen/module.go b/codegen/module.go index 277c8d7c2..51bfa47eb 100644 --- a/codegen/module.go +++ b/codegen/module.go @@ -1307,14 +1307,6 @@ func PrintGenLine( // FormatGoFile reformat the go file imports func FormatGoFile(filePath string) error { - gofmtCmd := exec.Command("gofmt", "-s", "-w", "-e", filePath) - gofmtCmd.Stdout = os.Stdout - gofmtCmd.Stderr = os.Stderr - - if err := gofmtCmd.Run(); err != nil { - return errors.Wrapf(err, "failed to gofmt file: %q", filePath) - } - goimportsCmd := exec.Command("goimports", "-w", "-e", filePath) goimportsCmd.Stdout = os.Stdout goimportsCmd.Stderr = os.Stderr @@ -1322,7 +1314,6 @@ func FormatGoFile(filePath string) error { if err := goimportsCmd.Run(); err != nil { return errors.Wrapf(err, "failed to goimports file: %q", filePath) } - return nil } diff --git a/codegen/runner/pre-steps.sh b/codegen/runner/pre-steps.sh index 56018ab49..c3d165592 100644 --- a/codegen/runner/pre-steps.sh +++ b/codegen/runner/pre-steps.sh @@ -135,8 +135,6 @@ for config_file in ${config_files}; do done done -gofmt -w -s "$BUILD_DIR/gen-code/" - end=$(date +%s) runtime=$((end-start)) echo "Generated structs : +$runtime" @@ -200,6 +198,8 @@ $(find "${target_dirs[@]}" -name "*.go" | \ ) "$EASY_JSON_BINARY" -all -- "${thriftrw_gofiles[@]}" +goimports -w "$BUILD_DIR/gen-code/" + end=$(date +%s) runtime=$((end-start)) echo "Generated structs : +$runtime" diff --git a/codegen/runner/runner.go b/codegen/runner/runner.go index 6c3e2a1b2..def57dd28 100644 --- a/codegen/runner/runner.go +++ b/codegen/runner/runner.go @@ -29,7 +29,7 @@ import ( "github.com/pkg/errors" "github.com/uber/zanzibar/codegen" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" ) type stackTracer interface { diff --git a/codegen/template.go b/codegen/template.go index 6b2f492bb..38be5fb7d 100644 --- a/codegen/template.go +++ b/codegen/template.go @@ -29,7 +29,7 @@ import ( tmpl "text/template" "github.com/pkg/errors" - "github.com/uber/zanzibar/codegen/template_bundle" + templates "github.com/uber/zanzibar/codegen/template_bundle" ) // AssetProvider provides access to template assets diff --git a/codegen/template_bundle/template_files.go b/codegen/template_bundle/template_files.go index abfd102f0..6e30578f0 100644 --- a/codegen/template_bundle/template_files.go +++ b/codegen/template_bundle/template_files.go @@ -3767,31 +3767,31 @@ type bintree struct { } var _bintree = &bintree{nil, map[string]*bintree{ - "augmented_mock.tmpl": {augmented_mockTmpl, map[string]*bintree{}}, - "dependency_struct.tmpl": {dependency_structTmpl, map[string]*bintree{}}, - "endpoint.tmpl": {endpointTmpl, map[string]*bintree{}}, - "endpoint_collection.tmpl": {endpoint_collectionTmpl, map[string]*bintree{}}, - "endpoint_test.tmpl": {endpoint_testTmpl, map[string]*bintree{}}, - "endpoint_test_tchannel_client.tmpl": {endpoint_test_tchannel_clientTmpl, map[string]*bintree{}}, - "fixture_types.tmpl": {fixture_typesTmpl, map[string]*bintree{}}, - "grpc_client.tmpl": {grpc_clientTmpl, map[string]*bintree{}}, - "http_client.tmpl": {http_clientTmpl, map[string]*bintree{}}, - "main.tmpl": {mainTmpl, map[string]*bintree{}}, - "main_test.tmpl": {main_testTmpl, map[string]*bintree{}}, - "middleware_http.tmpl": {middleware_httpTmpl, map[string]*bintree{}}, - "middleware_tchannel.tmpl": {middleware_tchannelTmpl, map[string]*bintree{}}, - "module_class_initializer.tmpl": {module_class_initializerTmpl, map[string]*bintree{}}, - "module_initializer.tmpl": {module_initializerTmpl, map[string]*bintree{}}, - "module_mock_initializer.tmpl": {module_mock_initializerTmpl, map[string]*bintree{}}, - "service.tmpl": {serviceTmpl, map[string]*bintree{}}, - "service_mock.tmpl": {service_mockTmpl, map[string]*bintree{}}, - "structs.tmpl": {structsTmpl, map[string]*bintree{}}, - "tchannel_client.tmpl": {tchannel_clientTmpl, map[string]*bintree{}}, - "tchannel_client_test_server.tmpl": {tchannel_client_test_serverTmpl, map[string]*bintree{}}, - "tchannel_endpoint.tmpl": {tchannel_endpointTmpl, map[string]*bintree{}}, - "workflow.tmpl": {workflowTmpl, map[string]*bintree{}}, - "workflow_mock.tmpl": {workflow_mockTmpl, map[string]*bintree{}}, - "workflow_mock_clients_type.tmpl": {workflow_mock_clients_typeTmpl, map[string]*bintree{}}, + "augmented_mock.tmpl": &bintree{augmented_mockTmpl, map[string]*bintree{}}, + "dependency_struct.tmpl": &bintree{dependency_structTmpl, map[string]*bintree{}}, + "endpoint.tmpl": &bintree{endpointTmpl, map[string]*bintree{}}, + "endpoint_collection.tmpl": &bintree{endpoint_collectionTmpl, map[string]*bintree{}}, + "endpoint_test.tmpl": &bintree{endpoint_testTmpl, map[string]*bintree{}}, + "endpoint_test_tchannel_client.tmpl": &bintree{endpoint_test_tchannel_clientTmpl, map[string]*bintree{}}, + "fixture_types.tmpl": &bintree{fixture_typesTmpl, map[string]*bintree{}}, + "grpc_client.tmpl": &bintree{grpc_clientTmpl, map[string]*bintree{}}, + "http_client.tmpl": &bintree{http_clientTmpl, map[string]*bintree{}}, + "main.tmpl": &bintree{mainTmpl, map[string]*bintree{}}, + "main_test.tmpl": &bintree{main_testTmpl, map[string]*bintree{}}, + "middleware_http.tmpl": &bintree{middleware_httpTmpl, map[string]*bintree{}}, + "middleware_tchannel.tmpl": &bintree{middleware_tchannelTmpl, map[string]*bintree{}}, + "module_class_initializer.tmpl": &bintree{module_class_initializerTmpl, map[string]*bintree{}}, + "module_initializer.tmpl": &bintree{module_initializerTmpl, map[string]*bintree{}}, + "module_mock_initializer.tmpl": &bintree{module_mock_initializerTmpl, map[string]*bintree{}}, + "service.tmpl": &bintree{serviceTmpl, map[string]*bintree{}}, + "service_mock.tmpl": &bintree{service_mockTmpl, map[string]*bintree{}}, + "structs.tmpl": &bintree{structsTmpl, map[string]*bintree{}}, + "tchannel_client.tmpl": &bintree{tchannel_clientTmpl, map[string]*bintree{}}, + "tchannel_client_test_server.tmpl": &bintree{tchannel_client_test_serverTmpl, map[string]*bintree{}}, + "tchannel_endpoint.tmpl": &bintree{tchannel_endpointTmpl, map[string]*bintree{}}, + "workflow.tmpl": &bintree{workflowTmpl, map[string]*bintree{}}, + "workflow_mock.tmpl": &bintree{workflow_mockTmpl, map[string]*bintree{}}, + "workflow_mock_clients_type.tmpl": &bintree{workflow_mock_clients_typeTmpl, map[string]*bintree{}}, }} // RestoreAsset restores an asset under the given directory diff --git a/examples/example-gateway/app.go b/examples/example-gateway/app.go index 9c91dea63..324d928d4 100644 --- a/examples/example-gateway/app.go +++ b/examples/example-gateway/app.go @@ -26,7 +26,8 @@ import ( "go.uber.org/zap" "context" - "github.com/uber/zanzibar/runtime" + + zanzibar "github.com/uber/zanzibar/runtime" ) // AppOptions defines the custom application func diff --git a/examples/example-gateway/app/demo/endpoints/abc/abc.go b/examples/example-gateway/app/demo/endpoints/abc/abc.go index 1ad726f18..961ebda5b 100644 --- a/examples/example-gateway/app/demo/endpoints/abc/abc.go +++ b/examples/example-gateway/app/demo/endpoints/abc/abc.go @@ -2,7 +2,8 @@ package abc import ( "context" - "github.com/uber/zanzibar/runtime" + + zanzibar "github.com/uber/zanzibar/runtime" module "github.com/uber/zanzibar/examples/example-gateway/build/app/demo/endpoints/abc/module" workflow "github.com/uber/zanzibar/examples/example-gateway/build/app/demo/endpoints/abc/workflow" diff --git a/examples/example-gateway/build/gen-code/clients/bar/bar/bar.go b/examples/example-gateway/build/gen-code/clients/bar/bar/bar.go index 2fbca8d88..525946d86 100644 --- a/examples/example-gateway/build/gen-code/clients/bar/bar/bar.go +++ b/examples/example-gateway/build/gen-code/clients/bar/bar/bar.go @@ -9,13 +9,14 @@ import ( json "encoding/json" errors "errors" fmt "fmt" + math "math" + strconv "strconv" + strings "strings" + foo "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/clients/foo/foo" multierr "go.uber.org/multierr" wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - math "math" - strconv "strconv" - strings "strings" ) type BarException struct { diff --git a/examples/example-gateway/build/gen-code/clients/bar/bar/bar_easyjson.go b/examples/example-gateway/build/gen-code/clients/bar/bar/bar_easyjson.go index 4f5d5b437..bdf663401 100644 --- a/examples/example-gateway/build/gen-code/clients/bar/bar/bar_easyjson.go +++ b/examples/example-gateway/build/gen-code/clients/bar/bar/bar_easyjson.go @@ -8,6 +8,7 @@ package bar import ( json "encoding/json" fmt "fmt" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/build/gen-code/clients/bar/bar/types_i64_easyjson.go b/examples/example-gateway/build/gen-code/clients/bar/bar/types_i64_easyjson.go index 98814958a..dd77aa1b6 100644 --- a/examples/example-gateway/build/gen-code/clients/bar/bar/types_i64_easyjson.go +++ b/examples/example-gateway/build/gen-code/clients/bar/bar/types_i64_easyjson.go @@ -7,6 +7,7 @@ package bar import ( json "encoding/json" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/build/gen-code/clients/baz/base/base.go b/examples/example-gateway/build/gen-code/clients/baz/base/base.go index 1e6340104..4ee8199f2 100644 --- a/examples/example-gateway/build/gen-code/clients/baz/base/base.go +++ b/examples/example-gateway/build/gen-code/clients/baz/base/base.go @@ -6,10 +6,11 @@ package base import ( errors "errors" fmt "fmt" + strings "strings" + multierr "go.uber.org/multierr" wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) type BazResponse struct { diff --git a/examples/example-gateway/build/gen-code/clients/baz/baz/baz.go b/examples/example-gateway/build/gen-code/clients/baz/baz/baz.go index e6268a5fd..b2a592d8a 100644 --- a/examples/example-gateway/build/gen-code/clients/baz/baz/baz.go +++ b/examples/example-gateway/build/gen-code/clients/baz/baz/baz.go @@ -9,13 +9,14 @@ import ( json "encoding/json" errors "errors" fmt "fmt" + math "math" + strconv "strconv" + strings "strings" + base "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/clients/baz/base" multierr "go.uber.org/multierr" wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - math "math" - strconv "strconv" - strings "strings" ) type AuthErr struct { diff --git a/examples/example-gateway/build/gen-code/clients/contacts/contacts/contacts.go b/examples/example-gateway/build/gen-code/clients/contacts/contacts/contacts.go index 45b2e3faa..81e4b6607 100644 --- a/examples/example-gateway/build/gen-code/clients/contacts/contacts/contacts.go +++ b/examples/example-gateway/build/gen-code/clients/contacts/contacts/contacts.go @@ -6,10 +6,11 @@ package contacts import ( errors "errors" fmt "fmt" + strings "strings" + multierr "go.uber.org/multierr" wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) type Contact struct { diff --git a/examples/example-gateway/build/gen-code/clients/contacts/contacts/contacts_easyjson.go b/examples/example-gateway/build/gen-code/clients/contacts/contacts/contacts_easyjson.go index 85435543d..7388a9e5b 100644 --- a/examples/example-gateway/build/gen-code/clients/contacts/contacts/contacts_easyjson.go +++ b/examples/example-gateway/build/gen-code/clients/contacts/contacts/contacts_easyjson.go @@ -8,6 +8,7 @@ package contacts import ( json "encoding/json" fmt "fmt" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/build/gen-code/clients/corge/corge/corge.go b/examples/example-gateway/build/gen-code/clients/corge/corge/corge.go index 1535cc789..30b0fd196 100644 --- a/examples/example-gateway/build/gen-code/clients/corge/corge/corge.go +++ b/examples/example-gateway/build/gen-code/clients/corge/corge/corge.go @@ -6,9 +6,10 @@ package corge import ( errors "errors" fmt "fmt" + strings "strings" + wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) // Corge_EchoBool_Args represents the arguments for the Corge.echoBool function. diff --git a/examples/example-gateway/build/gen-code/clients/corge/corge/corge_easyjson.go b/examples/example-gateway/build/gen-code/clients/corge/corge/corge_easyjson.go index 015544f6e..adaf9d95f 100644 --- a/examples/example-gateway/build/gen-code/clients/corge/corge/corge_easyjson.go +++ b/examples/example-gateway/build/gen-code/clients/corge/corge/corge_easyjson.go @@ -8,6 +8,7 @@ package corge import ( json "encoding/json" fmt "fmt" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/build/gen-code/clients/echo/echo.pb.go b/examples/example-gateway/build/gen-code/clients/echo/echo.pb.go index 0cc870b7d..80ed2ad3d 100644 --- a/examples/example-gateway/build/gen-code/clients/echo/echo.pb.go +++ b/examples/example-gateway/build/gen-code/clients/echo/echo.pb.go @@ -5,11 +5,12 @@ package echo import ( fmt "fmt" - proto "github.com/gogo/protobuf/proto" io "io" math "math" reflect "reflect" strings "strings" + + proto "github.com/gogo/protobuf/proto" ) // Reference imports to suppress errors if they are not otherwise used. diff --git a/examples/example-gateway/build/gen-code/clients/echo/echo.pb.yarpc.go b/examples/example-gateway/build/gen-code/clients/echo/echo.pb.yarpc.go index 346494e85..4d43b53e5 100644 --- a/examples/example-gateway/build/gen-code/clients/echo/echo.pb.yarpc.go +++ b/examples/example-gateway/build/gen-code/clients/echo/echo.pb.yarpc.go @@ -214,7 +214,7 @@ var ( var yarpcFileDescriptorClosure6caa5dd77ae15c91 = [][]byte{ // clients/echo/echo.proto - { + []byte{ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0xce, 0xc9, 0x4c, 0xcd, 0x2b, 0x29, 0xd6, 0x4f, 0x4d, 0xce, 0xc8, 0x07, 0x13, 0x7a, 0x05, 0x45, 0xf9, 0x25, 0xf9, 0x42, 0x2c, 0x20, 0xb6, 0x92, 0x32, 0x17, 0x7b, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71, 0x89, 0x90, diff --git a/examples/example-gateway/build/gen-code/clients/foo/base/base/base.go b/examples/example-gateway/build/gen-code/clients/foo/base/base/base.go index 03c2a53e2..6dd9b41f0 100644 --- a/examples/example-gateway/build/gen-code/clients/foo/base/base/base.go +++ b/examples/example-gateway/build/gen-code/clients/foo/base/base/base.go @@ -6,9 +6,10 @@ package base import ( errors "errors" fmt "fmt" + strings "strings" + wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) type Message struct { diff --git a/examples/example-gateway/build/gen-code/clients/foo/base/base/base_easyjson.go b/examples/example-gateway/build/gen-code/clients/foo/base/base/base_easyjson.go index 55dc18dd4..a78f9d1e1 100644 --- a/examples/example-gateway/build/gen-code/clients/foo/base/base/base_easyjson.go +++ b/examples/example-gateway/build/gen-code/clients/foo/base/base/base_easyjson.go @@ -8,6 +8,7 @@ package base import ( json "encoding/json" fmt "fmt" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/build/gen-code/clients/foo/foo/foo.go b/examples/example-gateway/build/gen-code/clients/foo/foo/foo.go index 2c6096bcb..59fcc7cf3 100644 --- a/examples/example-gateway/build/gen-code/clients/foo/foo/foo.go +++ b/examples/example-gateway/build/gen-code/clients/foo/foo/foo.go @@ -6,11 +6,12 @@ package foo import ( errors "errors" fmt "fmt" + strings "strings" + base "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/clients/foo/base/base" multierr "go.uber.org/multierr" wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) type FooException struct { diff --git a/examples/example-gateway/build/gen-code/clients/foo/foo/foo_easyjson.go b/examples/example-gateway/build/gen-code/clients/foo/foo/foo_easyjson.go index ead5ac4d1..36c637717 100644 --- a/examples/example-gateway/build/gen-code/clients/foo/foo/foo_easyjson.go +++ b/examples/example-gateway/build/gen-code/clients/foo/foo/foo_easyjson.go @@ -8,6 +8,7 @@ package foo import ( json "encoding/json" fmt "fmt" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/build/gen-code/clients/googlenow/googlenow/googlenow.go b/examples/example-gateway/build/gen-code/clients/googlenow/googlenow/googlenow.go index 7095a8149..b4b55c984 100644 --- a/examples/example-gateway/build/gen-code/clients/googlenow/googlenow/googlenow.go +++ b/examples/example-gateway/build/gen-code/clients/googlenow/googlenow/googlenow.go @@ -6,9 +6,10 @@ package googlenow import ( errors "errors" fmt "fmt" + strings "strings" + wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) // GoogleNowService_AddCredentials_Args represents the arguments for the GoogleNowService.addCredentials function. diff --git a/examples/example-gateway/build/gen-code/clients/googlenow/googlenow/googlenow_easyjson.go b/examples/example-gateway/build/gen-code/clients/googlenow/googlenow/googlenow_easyjson.go index bd1c0b8d6..f774d65cf 100644 --- a/examples/example-gateway/build/gen-code/clients/googlenow/googlenow/googlenow_easyjson.go +++ b/examples/example-gateway/build/gen-code/clients/googlenow/googlenow/googlenow_easyjson.go @@ -8,6 +8,7 @@ package googlenow import ( json "encoding/json" fmt "fmt" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/build/gen-code/clients/multi/multi/multi.go b/examples/example-gateway/build/gen-code/clients/multi/multi/multi.go index e5398f7d4..9a6359415 100644 --- a/examples/example-gateway/build/gen-code/clients/multi/multi/multi.go +++ b/examples/example-gateway/build/gen-code/clients/multi/multi/multi.go @@ -6,9 +6,10 @@ package multi import ( errors "errors" fmt "fmt" + strings "strings" + wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) // ServiceABack_Hello_Args represents the arguments for the ServiceABack.hello function. diff --git a/examples/example-gateway/build/gen-code/clients/multi/multi/multi_easyjson.go b/examples/example-gateway/build/gen-code/clients/multi/multi/multi_easyjson.go index 41ee3e6c8..34161eb06 100644 --- a/examples/example-gateway/build/gen-code/clients/multi/multi/multi_easyjson.go +++ b/examples/example-gateway/build/gen-code/clients/multi/multi/multi_easyjson.go @@ -7,6 +7,7 @@ package multi import ( json "encoding/json" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/build/gen-code/clients/withexceptions/withexceptions/withexceptions.go b/examples/example-gateway/build/gen-code/clients/withexceptions/withexceptions/withexceptions.go index 01ffbca0b..fa2323728 100644 --- a/examples/example-gateway/build/gen-code/clients/withexceptions/withexceptions/withexceptions.go +++ b/examples/example-gateway/build/gen-code/clients/withexceptions/withexceptions/withexceptions.go @@ -6,10 +6,11 @@ package withexceptions import ( errors "errors" fmt "fmt" + strings "strings" + multierr "go.uber.org/multierr" wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) type ExceptionType1 struct { diff --git a/examples/example-gateway/build/gen-code/clients/withexceptions/withexceptions/withexceptions_easyjson.go b/examples/example-gateway/build/gen-code/clients/withexceptions/withexceptions/withexceptions_easyjson.go index d37c9e09f..aec6d3648 100644 --- a/examples/example-gateway/build/gen-code/clients/withexceptions/withexceptions/withexceptions_easyjson.go +++ b/examples/example-gateway/build/gen-code/clients/withexceptions/withexceptions/withexceptions_easyjson.go @@ -8,6 +8,7 @@ package withexceptions import ( json "encoding/json" fmt "fmt" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/build/gen-code/endpoints/app/demo/endpoints/abc/abc.go b/examples/example-gateway/build/gen-code/endpoints/app/demo/endpoints/abc/abc.go index 12bfd9b95..c130a13c4 100644 --- a/examples/example-gateway/build/gen-code/endpoints/app/demo/endpoints/abc/abc.go +++ b/examples/example-gateway/build/gen-code/endpoints/app/demo/endpoints/abc/abc.go @@ -6,9 +6,10 @@ package abc import ( errors "errors" fmt "fmt" + strings "strings" + wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) // AppDemoService_Call_Args represents the arguments for the AppDemoService.Call function. diff --git a/examples/example-gateway/build/gen-code/endpoints/bar/bar/bar.go b/examples/example-gateway/build/gen-code/endpoints/bar/bar/bar.go index 9c2869db0..57ae7a821 100644 --- a/examples/example-gateway/build/gen-code/endpoints/bar/bar/bar.go +++ b/examples/example-gateway/build/gen-code/endpoints/bar/bar/bar.go @@ -9,13 +9,14 @@ import ( json "encoding/json" errors "errors" fmt "fmt" + math "math" + strconv "strconv" + strings "strings" + foo "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/endpoints/foo/foo" multierr "go.uber.org/multierr" wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - math "math" - strconv "strconv" - strings "strings" ) type BarException struct { diff --git a/examples/example-gateway/build/gen-code/endpoints/bar/bar/bar_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/bar/bar/bar_easyjson.go index 91c43c784..3eee7c992 100644 --- a/examples/example-gateway/build/gen-code/endpoints/bar/bar/bar_easyjson.go +++ b/examples/example-gateway/build/gen-code/endpoints/bar/bar/bar_easyjson.go @@ -8,6 +8,7 @@ package bar import ( json "encoding/json" fmt "fmt" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/build/gen-code/endpoints/bar/bar/types_i64_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/bar/bar/types_i64_easyjson.go index 98814958a..dd77aa1b6 100644 --- a/examples/example-gateway/build/gen-code/endpoints/bar/bar/types_i64_easyjson.go +++ b/examples/example-gateway/build/gen-code/endpoints/bar/bar/types_i64_easyjson.go @@ -7,6 +7,7 @@ package bar import ( json "encoding/json" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/build/gen-code/endpoints/baz/baz/baz.go b/examples/example-gateway/build/gen-code/endpoints/baz/baz/baz.go index c639e089b..aaa207a39 100644 --- a/examples/example-gateway/build/gen-code/endpoints/baz/baz/baz.go +++ b/examples/example-gateway/build/gen-code/endpoints/baz/baz/baz.go @@ -6,10 +6,11 @@ package baz import ( errors "errors" fmt "fmt" + strings "strings" + multierr "go.uber.org/multierr" wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) type AuthErr struct { diff --git a/examples/example-gateway/build/gen-code/endpoints/baz/baz/baz_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/baz/baz/baz_easyjson.go index c26aa212d..5a0a16942 100644 --- a/examples/example-gateway/build/gen-code/endpoints/baz/baz/baz_easyjson.go +++ b/examples/example-gateway/build/gen-code/endpoints/baz/baz/baz_easyjson.go @@ -8,6 +8,7 @@ package baz import ( json "encoding/json" fmt "fmt" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/build/gen-code/endpoints/bounce/bounce/bounce.go b/examples/example-gateway/build/gen-code/endpoints/bounce/bounce/bounce.go index a6eb7fb60..9cfac0fe2 100644 --- a/examples/example-gateway/build/gen-code/endpoints/bounce/bounce/bounce.go +++ b/examples/example-gateway/build/gen-code/endpoints/bounce/bounce/bounce.go @@ -6,9 +6,10 @@ package bounce import ( errors "errors" fmt "fmt" + strings "strings" + wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) // Bounce_Bounce_Args represents the arguments for the Bounce.bounce function. diff --git a/examples/example-gateway/build/gen-code/endpoints/contacts/contacts/contacts.go b/examples/example-gateway/build/gen-code/endpoints/contacts/contacts/contacts.go index 45b2e3faa..81e4b6607 100644 --- a/examples/example-gateway/build/gen-code/endpoints/contacts/contacts/contacts.go +++ b/examples/example-gateway/build/gen-code/endpoints/contacts/contacts/contacts.go @@ -6,10 +6,11 @@ package contacts import ( errors "errors" fmt "fmt" + strings "strings" + multierr "go.uber.org/multierr" wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) type Contact struct { diff --git a/examples/example-gateway/build/gen-code/endpoints/contacts/contacts/contacts_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/contacts/contacts/contacts_easyjson.go index 6f1cb8d95..7bb912feb 100644 --- a/examples/example-gateway/build/gen-code/endpoints/contacts/contacts/contacts_easyjson.go +++ b/examples/example-gateway/build/gen-code/endpoints/contacts/contacts/contacts_easyjson.go @@ -8,6 +8,7 @@ package contacts import ( json "encoding/json" fmt "fmt" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/build/gen-code/endpoints/foo/base/base/base.go b/examples/example-gateway/build/gen-code/endpoints/foo/base/base/base.go index 03c2a53e2..6dd9b41f0 100644 --- a/examples/example-gateway/build/gen-code/endpoints/foo/base/base/base.go +++ b/examples/example-gateway/build/gen-code/endpoints/foo/base/base/base.go @@ -6,9 +6,10 @@ package base import ( errors "errors" fmt "fmt" + strings "strings" + wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) type Message struct { diff --git a/examples/example-gateway/build/gen-code/endpoints/foo/base/base/base_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/foo/base/base/base_easyjson.go index fd01d283c..cea4f2ca6 100644 --- a/examples/example-gateway/build/gen-code/endpoints/foo/base/base/base_easyjson.go +++ b/examples/example-gateway/build/gen-code/endpoints/foo/base/base/base_easyjson.go @@ -8,6 +8,7 @@ package base import ( json "encoding/json" fmt "fmt" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/build/gen-code/endpoints/foo/foo/foo.go b/examples/example-gateway/build/gen-code/endpoints/foo/foo/foo.go index 27e3f4203..bdf08b67e 100644 --- a/examples/example-gateway/build/gen-code/endpoints/foo/foo/foo.go +++ b/examples/example-gateway/build/gen-code/endpoints/foo/foo/foo.go @@ -6,11 +6,12 @@ package foo import ( errors "errors" fmt "fmt" + strings "strings" + base "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/endpoints/foo/base/base" multierr "go.uber.org/multierr" wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) type FooException struct { diff --git a/examples/example-gateway/build/gen-code/endpoints/foo/foo/foo_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/foo/foo/foo_easyjson.go index 0560f18fb..6296a9944 100644 --- a/examples/example-gateway/build/gen-code/endpoints/foo/foo/foo_easyjson.go +++ b/examples/example-gateway/build/gen-code/endpoints/foo/foo/foo_easyjson.go @@ -8,6 +8,7 @@ package foo import ( json "encoding/json" fmt "fmt" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/build/gen-code/endpoints/googlenow/googlenow/googlenow.go b/examples/example-gateway/build/gen-code/endpoints/googlenow/googlenow/googlenow.go index e8c6b7016..542e39756 100644 --- a/examples/example-gateway/build/gen-code/endpoints/googlenow/googlenow/googlenow.go +++ b/examples/example-gateway/build/gen-code/endpoints/googlenow/googlenow/googlenow.go @@ -6,9 +6,10 @@ package googlenow import ( errors "errors" fmt "fmt" + strings "strings" + wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) // GoogleNow_AddCredentials_Args represents the arguments for the GoogleNow.addCredentials function. diff --git a/examples/example-gateway/build/gen-code/endpoints/googlenow/googlenow/googlenow_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/googlenow/googlenow/googlenow_easyjson.go index 6bfebe3ba..fa6814db0 100644 --- a/examples/example-gateway/build/gen-code/endpoints/googlenow/googlenow/googlenow_easyjson.go +++ b/examples/example-gateway/build/gen-code/endpoints/googlenow/googlenow/googlenow_easyjson.go @@ -8,6 +8,7 @@ package googlenow import ( json "encoding/json" fmt "fmt" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/build/gen-code/endpoints/models/meta/meta.go b/examples/example-gateway/build/gen-code/endpoints/models/meta/meta.go index af29ab0aa..a2f2531ae 100644 --- a/examples/example-gateway/build/gen-code/endpoints/models/meta/meta.go +++ b/examples/example-gateway/build/gen-code/endpoints/models/meta/meta.go @@ -6,9 +6,10 @@ package meta import ( errors "errors" fmt "fmt" + strings "strings" + wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) type Dgx struct { diff --git a/examples/example-gateway/build/gen-code/endpoints/multi/multi/multi.go b/examples/example-gateway/build/gen-code/endpoints/multi/multi/multi.go index 2ffc37356..92d04b37f 100644 --- a/examples/example-gateway/build/gen-code/endpoints/multi/multi/multi.go +++ b/examples/example-gateway/build/gen-code/endpoints/multi/multi/multi.go @@ -6,9 +6,10 @@ package multi import ( errors "errors" fmt "fmt" + strings "strings" + wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) // ServiceAFront_Hello_Args represents the arguments for the ServiceAFront.hello function. diff --git a/examples/example-gateway/build/gen-code/endpoints/multi/multi/multi_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/multi/multi/multi_easyjson.go index 55e692902..e04802e36 100644 --- a/examples/example-gateway/build/gen-code/endpoints/multi/multi/multi_easyjson.go +++ b/examples/example-gateway/build/gen-code/endpoints/multi/multi/multi_easyjson.go @@ -7,6 +7,7 @@ package multi import ( json "encoding/json" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/build/gen-code/endpoints/tchannel/baz/baz/baz.go b/examples/example-gateway/build/gen-code/endpoints/tchannel/baz/baz/baz.go index 902025535..2447fb508 100644 --- a/examples/example-gateway/build/gen-code/endpoints/tchannel/baz/baz/baz.go +++ b/examples/example-gateway/build/gen-code/endpoints/tchannel/baz/baz/baz.go @@ -6,10 +6,11 @@ package baz import ( errors "errors" fmt "fmt" + strings "strings" + multierr "go.uber.org/multierr" wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) type AuthErr struct { diff --git a/examples/example-gateway/build/gen-code/endpoints/tchannel/echo/echo/echo.go b/examples/example-gateway/build/gen-code/endpoints/tchannel/echo/echo/echo.go index 6d064f088..0699fe20c 100644 --- a/examples/example-gateway/build/gen-code/endpoints/tchannel/echo/echo/echo.go +++ b/examples/example-gateway/build/gen-code/endpoints/tchannel/echo/echo/echo.go @@ -6,9 +6,10 @@ package echo import ( errors "errors" fmt "fmt" + strings "strings" + wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) // Echo_Echo_Args represents the arguments for the Echo.echo function. diff --git a/examples/example-gateway/build/gen-code/endpoints/tchannel/quux/quux/quux.go b/examples/example-gateway/build/gen-code/endpoints/tchannel/quux/quux/quux.go index 68bf55e94..57766c8a1 100644 --- a/examples/example-gateway/build/gen-code/endpoints/tchannel/quux/quux/quux.go +++ b/examples/example-gateway/build/gen-code/endpoints/tchannel/quux/quux/quux.go @@ -6,9 +6,10 @@ package quux import ( errors "errors" fmt "fmt" + strings "strings" + wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) // SimpleService_EchoString_Args represents the arguments for the SimpleService.EchoString function. diff --git a/examples/example-gateway/build/gen-code/endpoints/withexceptions/withexceptions/withexceptions.go b/examples/example-gateway/build/gen-code/endpoints/withexceptions/withexceptions/withexceptions.go index 7f62866c5..2f6ec68ee 100644 --- a/examples/example-gateway/build/gen-code/endpoints/withexceptions/withexceptions/withexceptions.go +++ b/examples/example-gateway/build/gen-code/endpoints/withexceptions/withexceptions/withexceptions.go @@ -6,10 +6,11 @@ package withexceptions import ( errors "errors" fmt "fmt" + strings "strings" + multierr "go.uber.org/multierr" wire "go.uber.org/thriftrw/wire" zapcore "go.uber.org/zap/zapcore" - strings "strings" ) type EndpointExceptionType1 struct { diff --git a/examples/example-gateway/build/gen-code/endpoints/withexceptions/withexceptions/withexceptions_easyjson.go b/examples/example-gateway/build/gen-code/endpoints/withexceptions/withexceptions/withexceptions_easyjson.go index 4dfb01b08..426ced314 100644 --- a/examples/example-gateway/build/gen-code/endpoints/withexceptions/withexceptions/withexceptions_easyjson.go +++ b/examples/example-gateway/build/gen-code/endpoints/withexceptions/withexceptions/withexceptions_easyjson.go @@ -8,6 +8,7 @@ package withexceptions import ( json "encoding/json" fmt "fmt" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/examples/example-gateway/endpoints/bounce/bounce.go b/examples/example-gateway/endpoints/bounce/bounce.go index b55f1689d..db4650dea 100644 --- a/examples/example-gateway/endpoints/bounce/bounce.go +++ b/examples/example-gateway/endpoints/bounce/bounce.go @@ -23,12 +23,12 @@ package bounce import ( "context" - "github.com/uber/zanzibar/examples/example-gateway/build/clients/echo" + echoclient "github.com/uber/zanzibar/examples/example-gateway/build/clients/echo" "github.com/uber/zanzibar/examples/example-gateway/build/endpoints/bounce/module" "github.com/uber/zanzibar/examples/example-gateway/build/endpoints/bounce/workflow" "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/clients/echo" "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/endpoints/bounce/bounce" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" ) // NewBounceBounceWorkflow ... diff --git a/examples/example-gateway/endpoints/contacts/save_contacts.go b/examples/example-gateway/endpoints/contacts/save_contacts.go index 19a14e3e8..418bb36c0 100644 --- a/examples/example-gateway/endpoints/contacts/save_contacts.go +++ b/examples/example-gateway/endpoints/contacts/save_contacts.go @@ -7,7 +7,7 @@ import ( "github.com/uber/zanzibar/examples/example-gateway/build/endpoints/contacts/workflow" contactsClientStructs "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/clients/contacts/contacts" endpointContacts "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/endpoints/contacts/contacts" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" "go.uber.org/zap" ) diff --git a/examples/example-gateway/endpoints/contacts/save_contacts_test.go b/examples/example-gateway/endpoints/contacts/save_contacts_test.go index 39d47ceb9..0be3e24fe 100644 --- a/examples/example-gateway/endpoints/contacts/save_contacts_test.go +++ b/examples/example-gateway/endpoints/contacts/save_contacts_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/uber/zanzibar/examples/example-gateway/build/endpoints/contacts/mock-workflow" + mockcontactsworkflow "github.com/uber/zanzibar/examples/example-gateway/build/endpoints/contacts/mock-workflow" endpointContacts "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/endpoints/contacts/contacts" ms "github.com/uber/zanzibar/examples/example-gateway/build/services/example-gateway/mock-service" ) diff --git a/examples/example-gateway/endpoints/panic/endpoint_panic.go b/examples/example-gateway/endpoints/panic/endpoint_panic.go index 8186d5edd..2856bd450 100644 --- a/examples/example-gateway/endpoints/panic/endpoint_panic.go +++ b/examples/example-gateway/endpoints/panic/endpoint_panic.go @@ -5,7 +5,7 @@ import ( "github.com/uber/zanzibar/examples/example-gateway/build/endpoints/panic/module" "github.com/uber/zanzibar/examples/example-gateway/build/endpoints/panic/workflow" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" ) // NewServiceCFrontHelloWorkflow ... diff --git a/examples/example-gateway/endpoints/panic/endpoint_panic_test.go b/examples/example-gateway/endpoints/panic/endpoint_panic_test.go index 6be81d68c..53b17bea7 100644 --- a/examples/example-gateway/endpoints/panic/endpoint_panic_test.go +++ b/examples/example-gateway/endpoints/panic/endpoint_panic_test.go @@ -2,10 +2,11 @@ package panic_test import ( "bytes" - "github.com/stretchr/testify/assert" "strings" "testing" + "github.com/stretchr/testify/assert" + ms "github.com/uber/zanzibar/examples/example-gateway/build/services/example-gateway/mock-service" ) diff --git a/examples/example-gateway/endpoints/tchannel/baz/baz_call.go b/examples/example-gateway/endpoints/tchannel/baz/baz_call.go index f0fe9564c..7ab97780b 100644 --- a/examples/example-gateway/endpoints/tchannel/baz/baz_call.go +++ b/examples/example-gateway/endpoints/tchannel/baz/baz_call.go @@ -28,7 +28,7 @@ import ( "github.com/uber/zanzibar/examples/example-gateway/build/endpoints/tchannel/baz/workflow" clientBaz "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/clients/baz/baz" endpointBaz "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/endpoints/tchannel/baz/baz" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" "go.uber.org/zap" ) diff --git a/examples/example-gateway/endpoints/tchannel/baz/baz_echo.go b/examples/example-gateway/endpoints/tchannel/baz/baz_echo.go index 355658380..6084d293e 100644 --- a/examples/example-gateway/endpoints/tchannel/baz/baz_echo.go +++ b/examples/example-gateway/endpoints/tchannel/baz/baz_echo.go @@ -23,11 +23,10 @@ package bazhandler import ( "context" - "github.com/uber/zanzibar/runtime" - "github.com/uber/zanzibar/examples/example-gateway/build/endpoints/tchannel/baz/module" "github.com/uber/zanzibar/examples/example-gateway/build/endpoints/tchannel/baz/workflow" endpointBaz "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/endpoints/tchannel/baz/baz" + zanzibar "github.com/uber/zanzibar/runtime" ) // NewSimpleServiceEchoWorkflow ... diff --git a/examples/example-gateway/endpoints/tchannel/echo/echo.go b/examples/example-gateway/endpoints/tchannel/echo/echo.go index bffa64cdb..16dcf99ea 100644 --- a/examples/example-gateway/endpoints/tchannel/echo/echo.go +++ b/examples/example-gateway/endpoints/tchannel/echo/echo.go @@ -26,7 +26,7 @@ import ( "github.com/uber/zanzibar/examples/example-gateway/build/endpoints/tchannel/echo/module" "github.com/uber/zanzibar/examples/example-gateway/build/endpoints/tchannel/echo/workflow" "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/endpoints/tchannel/echo/echo" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" ) // NewEchoEchoWorkflow ... diff --git a/examples/example-gateway/endpoints/tchannel/panic/panic_call.go b/examples/example-gateway/endpoints/tchannel/panic/panic_call.go index 814656c63..83732770c 100644 --- a/examples/example-gateway/endpoints/tchannel/panic/panic_call.go +++ b/examples/example-gateway/endpoints/tchannel/panic/panic_call.go @@ -26,7 +26,7 @@ import ( "github.com/uber/zanzibar/examples/example-gateway/build/endpoints/tchannel/panic/module" "github.com/uber/zanzibar/examples/example-gateway/build/endpoints/tchannel/panic/workflow" endpointBaz "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/endpoints/tchannel/baz/baz" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" "go.uber.org/zap" ) diff --git a/examples/example-gateway/endpoints/tchannel/quux/handler.go b/examples/example-gateway/endpoints/tchannel/quux/handler.go index 88f631486..bc4134a05 100644 --- a/examples/example-gateway/endpoints/tchannel/quux/handler.go +++ b/examples/example-gateway/endpoints/tchannel/quux/handler.go @@ -27,7 +27,7 @@ import ( "github.com/uber/zanzibar/examples/example-gateway/build/endpoints/tchannel/quux/workflow" thriftQuux "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/endpoints/tchannel/quux/quux" "github.com/uber/zanzibar/examples/example-gateway/clients/quux" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" ) type handler struct { diff --git a/examples/example-gateway/middlewares/default/default_example/default_example.go b/examples/example-gateway/middlewares/default/default_example/default_example.go index f15c479e4..7a9516afe 100644 --- a/examples/example-gateway/middlewares/default/default_example/default_example.go +++ b/examples/example-gateway/middlewares/default/default_example/default_example.go @@ -25,7 +25,7 @@ import ( "github.com/mcuadros/go-jsonschema-generator" "github.com/uber/zanzibar/examples/example-gateway/build/middlewares/default/default_example/module" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" ) type defaultExampleMiddleware struct { diff --git a/examples/example-gateway/middlewares/default/default_example2/default_example2.go b/examples/example-gateway/middlewares/default/default_example2/default_example2.go index bf60b37f1..590455454 100644 --- a/examples/example-gateway/middlewares/default/default_example2/default_example2.go +++ b/examples/example-gateway/middlewares/default/default_example2/default_example2.go @@ -25,7 +25,7 @@ import ( "github.com/mcuadros/go-jsonschema-generator" "github.com/uber/zanzibar/examples/example-gateway/build/middlewares/default/default_example2/module" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" ) type defaultExample2Middleware struct { diff --git a/examples/example-gateway/middlewares/default/default_example_tchannel/default_example_tchannel.go b/examples/example-gateway/middlewares/default/default_example_tchannel/default_example_tchannel.go index 50ad7ae9b..c3d52c657 100644 --- a/examples/example-gateway/middlewares/default/default_example_tchannel/default_example_tchannel.go +++ b/examples/example-gateway/middlewares/default/default_example_tchannel/default_example_tchannel.go @@ -22,9 +22,10 @@ package defaultexampletchannel import ( "context" + "github.com/mcuadros/go-jsonschema-generator" "github.com/uber/zanzibar/examples/example-gateway/build/middlewares/default/default_example_tchannel/module" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" "go.uber.org/thriftrw/wire" ) diff --git a/examples/example-gateway/middlewares/example/example.go b/examples/example-gateway/middlewares/example/example.go index 3fa8c56d7..c028bba24 100644 --- a/examples/example-gateway/middlewares/example/example.go +++ b/examples/example-gateway/middlewares/example/example.go @@ -25,7 +25,7 @@ import ( "github.com/mcuadros/go-jsonschema-generator" "github.com/uber/zanzibar/examples/example-gateway/build/middlewares/example/module" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" ) type exampleMiddleware struct { diff --git a/examples/example-gateway/middlewares/example_tchannel/example_tchannel.go b/examples/example-gateway/middlewares/example_tchannel/example_tchannel.go index 7fb88c520..6f81740f6 100644 --- a/examples/example-gateway/middlewares/example_tchannel/example_tchannel.go +++ b/examples/example-gateway/middlewares/example_tchannel/example_tchannel.go @@ -22,9 +22,10 @@ package exampletchannel import ( "context" + "github.com/mcuadros/go-jsonschema-generator" "github.com/uber/zanzibar/examples/example-gateway/build/middlewares/example_tchannel/module" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" "go.uber.org/thriftrw/wire" ) diff --git a/runtime/client_http_request_test.go b/runtime/client_http_request_test.go index 0af6b2c29..2e3efaf9d 100644 --- a/runtime/client_http_request_test.go +++ b/runtime/client_http_request_test.go @@ -30,7 +30,7 @@ import ( "github.com/stretchr/testify/assert" clientsBarBar "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/clients/bar/bar" exampleGateway "github.com/uber/zanzibar/examples/example-gateway/build/services/example-gateway" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" benchGateway "github.com/uber/zanzibar/test/lib/bench_gateway" testGateway "github.com/uber/zanzibar/test/lib/test_gateway" "github.com/uber/zanzibar/test/lib/util" diff --git a/runtime/client_http_response_test.go b/runtime/client_http_response_test.go index f0aa279af..f5c4323b2 100644 --- a/runtime/client_http_response_test.go +++ b/runtime/client_http_response_test.go @@ -28,7 +28,7 @@ import ( "github.com/stretchr/testify/assert" exampleGateway "github.com/uber/zanzibar/examples/example-gateway/build/services/example-gateway" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" benchGateway "github.com/uber/zanzibar/test/lib/bench_gateway" testGateway "github.com/uber/zanzibar/test/lib/test_gateway" "github.com/uber/zanzibar/test/lib/util" diff --git a/runtime/middlewares_tchannel_test.go b/runtime/middlewares_tchannel_test.go index 357797b97..4b8b71bee 100644 --- a/runtime/middlewares_tchannel_test.go +++ b/runtime/middlewares_tchannel_test.go @@ -29,8 +29,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/endpoints/tchannel/baz/baz" ms "github.com/uber/zanzibar/examples/example-gateway/build/services/example-gateway/mock-service" - "github.com/uber/zanzibar/examples/example-gateway/middlewares/example_tchannel" - "github.com/uber/zanzibar/runtime" + exampletchannel "github.com/uber/zanzibar/examples/example-gateway/middlewares/example_tchannel" + zanzibar "github.com/uber/zanzibar/runtime" "go.uber.org/thriftrw/wire" ) diff --git a/runtime/middlewares_test.go b/runtime/middlewares_test.go index 023249512..bd58c3d61 100644 --- a/runtime/middlewares_test.go +++ b/runtime/middlewares_test.go @@ -31,7 +31,7 @@ import ( exampleGateway "github.com/uber/zanzibar/examples/example-gateway/build/services/example-gateway" "github.com/uber/zanzibar/examples/example-gateway/middlewares/example" exampleReader "github.com/uber/zanzibar/examples/example-gateway/middlewares/example_reader" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" benchGateway "github.com/uber/zanzibar/test/lib/bench_gateway" ) diff --git a/runtime/router.go b/runtime/router.go index 427559aea..315abea86 100644 --- a/runtime/router.go +++ b/runtime/router.go @@ -25,13 +25,14 @@ import ( "fmt" "net/http" + "net/url" + "github.com/opentracing/opentracing-go" "github.com/pborman/uuid" "github.com/pkg/errors" "github.com/uber-go/tally" zrouter "github.com/uber/zanzibar/runtime/router" "go.uber.org/zap" - "net/url" ) const ( diff --git a/runtime/server_header.go b/runtime/server_header.go index 0315a3725..566bc02df 100644 --- a/runtime/server_header.go +++ b/runtime/server_header.go @@ -26,6 +26,7 @@ import ( "strings" "context" + "github.com/pkg/errors" "go.uber.org/zap" ) diff --git a/runtime/server_http_request_test.go b/runtime/server_http_request_test.go index 2bacb414f..649605092 100644 --- a/runtime/server_http_request_test.go +++ b/runtime/server_http_request_test.go @@ -34,7 +34,7 @@ import ( "github.com/stretchr/testify/assert" exampleGateway "github.com/uber/zanzibar/examples/example-gateway/build/services/example-gateway" ms "github.com/uber/zanzibar/examples/example-gateway/build/services/example-gateway/mock-service" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" benchGateway "github.com/uber/zanzibar/test/lib/bench_gateway" testGateway "github.com/uber/zanzibar/test/lib/test_gateway" "github.com/uber/zanzibar/test/lib/util" diff --git a/runtime/server_http_response_easyjson_test.go b/runtime/server_http_response_easyjson_test.go index b541c846c..06f4ded66 100644 --- a/runtime/server_http_response_easyjson_test.go +++ b/runtime/server_http_response_easyjson_test.go @@ -24,6 +24,7 @@ package zanzibar_test import ( json "encoding/json" + easyjson "github.com/mailru/easyjson" jlexer "github.com/mailru/easyjson/jlexer" jwriter "github.com/mailru/easyjson/jwriter" diff --git a/runtime/tchannel_logger_test.go b/runtime/tchannel_logger_test.go index f79a06d14..f02e581f0 100644 --- a/runtime/tchannel_logger_test.go +++ b/runtime/tchannel_logger_test.go @@ -24,7 +24,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" "github.com/uber/tchannel-go" "go.uber.org/zap" diff --git a/test/endpoints/tchannel/baz/baz_simpleservice_method_call_test.go b/test/endpoints/tchannel/baz/baz_simpleservice_method_call_test.go index c44cd05e5..a10787e39 100644 --- a/test/endpoints/tchannel/baz/baz_simpleservice_method_call_test.go +++ b/test/endpoints/tchannel/baz/baz_simpleservice_method_call_test.go @@ -26,6 +26,8 @@ import ( "testing" "time" + "strings" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/uber-go/tally" @@ -34,7 +36,6 @@ import ( endpointsBaz "github.com/uber/zanzibar/examples/example-gateway/build/gen-code/endpoints/tchannel/baz/baz" testGateway "github.com/uber/zanzibar/test/lib/test_gateway" "github.com/uber/zanzibar/test/lib/util" - "strings" ) func TestCallTChannelSuccessfulRequestOKResponse(t *testing.T) { diff --git a/test/lib/sort_metrics.go b/test/lib/sort_metrics.go index 4a2f6293c..3ee437873 100644 --- a/test/lib/sort_metrics.go +++ b/test/lib/sort_metrics.go @@ -22,7 +22,7 @@ package lib import ( "github.com/uber-go/tally" - "github.com/uber-go/tally/m3/thrift" + m3 "github.com/uber-go/tally/m3/thrift" ) // SortMetricsByNameAndTags ... diff --git a/test/lib/test_backend/test_http_backend.go b/test/lib/test_backend/test_http_backend.go index 05e0007ef..a22610ff7 100644 --- a/test/lib/test_backend/test_http_backend.go +++ b/test/lib/test_backend/test_http_backend.go @@ -25,7 +25,7 @@ import ( "strconv" "sync" - "github.com/uber/zanzibar/runtime" + zanzibar "github.com/uber/zanzibar/runtime" zrouter "github.com/uber/zanzibar/runtime/router" "go.uber.org/zap" ) diff --git a/test/lib/test_m3_server/test_m3_server.go b/test/lib/test_m3_server/test_m3_server.go index 9297be32c..5cec97d6c 100644 --- a/test/lib/test_m3_server/test_m3_server.go +++ b/test/lib/test_m3_server/test_m3_server.go @@ -34,8 +34,8 @@ import ( "github.com/stretchr/testify/require" "github.com/uber-go/tally" metrics "github.com/uber-go/tally/m3" - "github.com/uber-go/tally/m3/customtransports" - "github.com/uber-go/tally/m3/thrift" + customtransport "github.com/uber-go/tally/m3/customtransports" + m3 "github.com/uber-go/tally/m3/thrift" "github.com/uber/zanzibar/test/lib" )