diff --git a/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoWriter.java b/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoWriter.java index 028d8113..9ded5b08 100644 --- a/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoWriter.java +++ b/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/GoWriter.java @@ -756,6 +756,13 @@ public boolean writePackageShapeDocs(Shape shape) { .map(DocumentationTrait::getValue) .map(docs -> { writePackageDocs(docs); + if (shape.hasTrait(DeprecatedTrait.class)) { + var message = shape.expectTrait(DeprecatedTrait.class) + .getMessage() + .orElse("This package is deprecated."); + writePackageDocs(""); + writePackageDocs("Deprecated: " + message); + } return true; }).orElse(false); }