codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/EndpointDiscoveryGenerator.java
private static void generateEndpointCacheResolver(Model model, GoWriter writer, ServiceShape serviceShape) {
        if (!serviceSupportsEndpointDiscovery(model, serviceShape)) {
            return;
        }

        writer.writeDocs("resolves endpoint cache on client");
        writer.openBlock("func $T(c *Client) {", "}", ENDPOINT_CACHE_RESOLVER, () -> {
            writer.write("c.$L = $T($L)", CLIENT_MEMBER_ENDPOINT_CACHE, NEW_ENDPOINT_CACHE,
                    DEFAULT_ENDPOINT_CACHE_SIZE);
        });
        writer.write("");
    }
// generates an endpoint cache resolver function
generates an endpoint cache resolver function
generates an endpoint cache resolver function
private static void generateEndpointCacheResolver(Model model, GoWriter writer, ServiceShape serviceShape) {
        if (!serviceSupportsEndpointDiscovery(model, serviceShape)) {
            return;
        }
        writer.writeDocs("resolves endpoint cache on client");
        writer.openBlock("func $T(c *Client) {", "}", ENDPOINT_CACHE_RESOLVER, () -> {
            writer.write("c.$L = $T($L)", CLIENT_MEMBER_ENDPOINT_CACHE, NEW_ENDPOINT_CACHE,
                    DEFAULT_ENDPOINT_CACHE_SIZE);
        });
        writer.write("");
    }
private static void generateEndpointCacheResolver ( Model model , GoWriter writer , ServiceShape serviceShape ) { if ( ! serviceSupportsEndpointDiscovery ( model , serviceShape ) ) { return ; } writer . writeDocs ( "resolves endpoint cache on client" ) ; writer . openBlock ( "func $T(c *Client) {" , "}" , ENDPOINT_CACHE_RESOLVER , ( ) -> { writer . write ( "c.$L = $T($L)" , CLIENT_MEMBER_ENDPOINT_CACHE , NEW_ENDPOINT_CACHE , DEFAULT_ENDPOINT_CACHE_SIZE ) ; } ) ; writer . write ( "" ) ; }
generates an endpoint cache resolver function
generates an endpoint cache resolver function