def write_csv_file(csv_filename, modules):
    with tempfile.TemporaryDirectory() as tmpdir:
        tmp_deps_path = os.path.join(tmpdir, 'dependencies.csv')
        go_license_detector('', tmp_deps_path, modules)
        rows = []
        fieldnames = []
        with open(tmp_deps_path) as csvfile:
            reader = csv.DictReader(csvfile)
            fieldnames = reader.fieldnames
            rows = [row for row in reader]
        with open(csv_filename, 'w') as csvfile:
            writer = csv.DictWriter(csvfile, fieldnames)
            writer.writeheader()
            for row in rows:
                writer.writerow(row)
            for dep in additional_third_party_deps:
                writer.writerow(dep)
def write_csv_file(csv_filename, modules):
    with tempfile.TemporaryDirectory() as tmpdir:
        tmp_deps_path = os.path.join(tmpdir, 'dependencies.csv')
        go_license_detector(, tmp_deps_path, modules)
        rows = []
        fieldnames = []
        with open(tmp_deps_path) as csvfile:
            reader = csv.DictReader(csvfile)
            fieldnames = reader.fieldnames
            rows = [row for row in reader]
        with open(csv_filename, 'w') as csvfile:
            writer = csv.DictWriter(csvfile, fieldnames)
            writer.writeheader()
            for row in rows:
                writer.writerow(row)
            for dep in additional_third_party_deps:
                writer.writerow(dep)