async def METHOD_NAME(request: LoadedGoBinaryRequest, goroot: GoRoot) -> LoadedGoBinary:
    file_contents = setup_files(request.dir_name, request.file_names)
    imports = _extract_imports(file_contents)
    imports.add("runtime")  # implicit linker dependency for all Go binaries
    build_opts = GoBuildOptions(cgo_enabled=False)
    source_digest = await Get(Digest, CreateDigest(file_contents))
    dep_build_requests = await MultiGet(
        Get(
            BuildGoPackageRequest,
            NaiveBuildGoPackageRequestForStdlibPackageRequest(dep_import_path),
        )
        for dep_import_path in sorted(imports)
    )
    built_pkg = await Get(
        BuiltGoPackage,
        BuildGoPackageRequest(
            import_path="main",
            pkg_name="main",
            dir_path=".",
            build_opts=build_opts,
            digest=source_digest,
            go_files=tuple(fc.path for fc in file_contents),
            s_files=(),
            direct_dependencies=dep_build_requests,
            minimum_go_version=goroot.version,
        ),
    )
    main_pkg_a_file_path = built_pkg.import_paths_to_pkg_a_files["main"]
    binary = await Get(
        LinkedGoBinary,
        LinkGoBinaryRequest(
            input_digest=built_pkg.digest,
            archives=(main_pkg_a_file_path,),
            build_opts=build_opts,
            import_paths_to_pkg_a_files=built_pkg.import_paths_to_pkg_a_files,
            output_filename=request.output_name,
            description=f"Link internal Go binary `{request.output_name}`",
        ),
    )
    return LoadedGoBinary(binary.digest)