Skip to content

Commit

Permalink
Change static middleware import
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianyi Wang committed Nov 28, 2023
1 parent 5b5d3bf commit 7840dc4
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import software.amazon.smithy.go.codegen.GoSettings;
import software.amazon.smithy.go.codegen.GoWriter;
import software.amazon.smithy.go.codegen.SmithyGoDependency;
import software.amazon.smithy.go.codegen.SmithyGoTypes;
import software.amazon.smithy.go.codegen.SymbolUtils;
import software.amazon.smithy.go.codegen.integration.ConfigField;
import software.amazon.smithy.go.codegen.integration.GoIntegration;
Expand Down Expand Up @@ -103,9 +104,6 @@ public static boolean isRequestCompressionService(Model model, ServiceShape serv
}

private GoWriter.Writable writeMiddlewareHelper(SymbolProvider symbolProvider, OperationShape operation) {
var stackSymbol = SymbolUtils
.createPointableSymbolBuilder("Stack", SmithyGoDependency.SMITHY_MIDDLEWARE)
.build();
var addInternalSymbol = SymbolUtils
.createValueSymbolBuilder(ADD_REQUEST_COMPRESSION_INTERNAL,
SmithyGoDependency.SMITHY_REQUEST_COMPRESSION)
Expand All @@ -128,7 +126,7 @@ private GoWriter.Writable writeMiddlewareHelper(SymbolProvider symbolProvider, O
""",
MapUtils.of(
"add", getAddRequestCompressionMiddlewareFuncName(operationName),
"stack", stackSymbol,
"stack", SmithyGoTypes.Middleware.Stack,
"addInternal", addInternalSymbol,
"algorithms", algorithms
));
Expand Down

0 comments on commit 7840dc4

Please sign in to comment.