Created
November 28, 2018 10:07
-
-
Save tommady/09f4c1459730c1e013a7a66153222d00 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ret := new(pb.Reply) | |
if x, ok := in.Arg.GetKind().(*structpb.Value_StringValue); ok { | |
s := x.StringValue + “ Generic!!!” | |
ret.Ret = &structpb.Value{ | |
Kind: &structpb.Value_StringValue{ | |
StringValue: s | |
} | |
} | |
} else if x, ok := in.Arg.GetKind().(*structpb.Value_NumberValue); ok { | |
i := x.NumberValue + 3345678 | |
ret.Ret = &structpb.Value{ | |
Kind: &structpb.Value_NumberValue{ | |
NumberValue: i | |
} | |
} | |
} | |
return ret, nil |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment