diff options
| author | jwijenbergh <jeroenwijenbergh@protonmail.com> | 2024-03-07 15:09:22 +0100 |
|---|---|---|
| committer | Jeroen Wijenbergh <46386452+jwijenbergh@users.noreply.github.com> | 2024-03-07 15:19:43 +0100 |
| commit | 47d9e993ce43c4238810a2533a81a24ee701f155 (patch) | |
| tree | 88932810d6c13eb3d8be05c48fe756159377d45e /genexportsdoc.py | |
| parent | 89111e1aef8a5bfbaa3b196b5cf27e768d225728 (diff) | |
Format: Run Black
Diffstat (limited to 'genexportsdoc.py')
| -rwxr-xr-x | genexportsdoc.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/genexportsdoc.py b/genexportsdoc.py index ed538b2..dc32182 100755 --- a/genexportsdoc.py +++ b/genexportsdoc.py @@ -2,9 +2,9 @@ import subprocess -cmd=["go", "doc", "--all", "exports"] +cmd = ["go", "doc", "--all", "exports"] -output=subprocess.check_output(cmd).decode("utf-8") +output = subprocess.check_output(cmd).decode("utf-8") section = [""] package_doc = "" @@ -26,14 +26,17 @@ for out in output.splitlines(): if in_section: section[num] += line + def func_name(signature: str) -> str: idx = signature.index("(") - return signature[len("func "):idx] + return signature[len("func ") : idx] + def gen_toc(title: str) -> str: id = "-".join(title.lower().split(" ")) return f"[{title}](#{id})" + toc = "" first = True |
