Skip to content

Commit

Permalink
feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
skotambkar committed Oct 21, 2020
1 parent 67681f0 commit ffda7ac
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,11 @@ private void writeHostedZoneIDInputSanitizer(
writer.openBlock("case $P :", "", symbolProvider.toSymbol(input), () -> {
writer.addUseImports(SmithyGoDependency.STRINGS);
for (MemberShape member : hostedZoneIDMembers) {
writer.openBlock("if i.$L != nil {", "}", member.getMemberName(), () -> {
writer.write("values := strings.Split(*i.$L, \"/\")", member.getMemberName());
writer.write("v := values[len(values)-1]");
writer.write("i.$L = &v", member.getMemberName());
String memberName = member.getMemberName();
writer.openBlock("if i.$L != nil {", "}", memberName, () -> {
writer.write("idx := strings.LastIndex(*i.$L, `/`)", memberName);
writer.write("v := (*i.$L)[idx+1:]", memberName);
writer.write("i.$L = &v", memberName);
});
}
});
Expand Down
104 changes: 52 additions & 52 deletions service/route53/api_client.go

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

0 comments on commit ffda7ac

Please sign in to comment.