<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_type_name(type_name, sub_type=None):
 """ Returns a go type according to a spec type """

    if type_name in ("string", "enum"):
        return "string"

    if type_name == "float":
        return "float64"

    if type_name == "boolean":
        return "bool"

    if type_name == "list":
        st = get_type_name(type_name=sub_type, sub_type=None) if sub_type else "interface{}"
        return "[]%s" % st

    if type_name == "integer":
        return "int"

    if type_name == "time":
        return "float64"

    return "interface{}"