fix and regen

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2023-02-22 00:12:01 +03:00
parent f72a39965a
commit 09f5a71e0b
32 changed files with 296 additions and 371 deletions

View File

@@ -6,9 +6,9 @@ import (
"strings"
"testing"
"github.com/golang/protobuf/ptypes/wrappers"
pb "go.unistack.org/micro-tests/client/grpc/proto"
"go.unistack.org/micro/v3/logger/unwrap"
"google.golang.org/protobuf/types/known/wrapperspb"
)
func TestProtoMessage(t *testing.T) {
@@ -26,12 +26,12 @@ func TestProtoMessage(t *testing.T) {
func TestWrappers(t *testing.T) {
type CustomerInfo struct {
MainPhone *wrappers.StringValue `logger:"take"`
BankClientId string `logger:"take"`
NullString sql.NullString `logger:"take"`
MainPhone *wrapperspb.StringValue `logger:"take"`
BankClientId string `logger:"take"`
NullString sql.NullString `logger:"take"`
}
c := &CustomerInfo{MainPhone: &wrappers.StringValue{Value: "+712334"}, BankClientId: "12345", NullString: sql.NullString{String: "test"}}
c := &CustomerInfo{MainPhone: &wrapperspb.StringValue{Value: "+712334"}, BankClientId: "12345", NullString: sql.NullString{String: "test"}}
buf := fmt.Sprintf("%#v", unwrap.Unwrap(c, unwrap.Tagged(true)))
cmp := `&unwrap_test.CustomerInfo{MainPhone:(*wrapperspb.StringValue){Value:"+712334"}, BankClientId:"12345", NullString:(sql.NullString){String:"test"}}`