From 7840dc4235ee65ae73eeef83cc931bbe5e5f0cde Mon Sep 17 00:00:00 2001 From: Tianyi Wang Date: Tue, 28 Nov 2023 14:37:19 -0500 Subject: [PATCH] Change static middleware import --- .../go/codegen/requestcompression/RequestCompression.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/requestcompression/RequestCompression.java b/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/requestcompression/RequestCompression.java index 1298735e8..b3b0be865 100644 --- a/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/requestcompression/RequestCompression.java +++ b/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/requestcompression/RequestCompression.java @@ -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; @@ -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) @@ -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 ));