from typing import Dict
from typing import List


def example_router_defs(implementations: Dict[str, str], api_package: str) -> List[str]:
    """Generate Go code for concrete example router & multi-router definitions.

    :param implementations: Relationship between API name and the name of the Go struct implementing the Implementation of that API
    :param api_package: Name of root/common API package
    :return: Lines of Go code for router definitions in a main function to use to handle HTTP requests
    """
    lines: List[str] = []

    for api_name, implementation in implementations.items():
        lines.append('%sRouter := %s.MakeAPIRouter(&%s{}, &authorizer)' % (api_name, api_name, implementation))
    router_list = ', '.join('&{}Router'.format(api_name) for api_name, _ in implementations.items())
    lines.append('multiRouter := %s.MultiRouter{Routers: []%s.PartialRouter{%s}}' % (api_package, api_package, router_list))

    return lines