Skip to content
Snippets Groups Projects
Verified Commit 18e5b255 authored by Janis Streib's avatar Janis Streib :owl:
Browse files

UPD: goalng: make package optional

parent 1c813f1b
No related branches found
No related tags found
No related merge requests found
......@@ -383,7 +383,7 @@ def ta_schema():
@cli.command()
@click.option('--package', help='GOLang Package name')
@click.option('--package', help='GOLang Package name', default=None)
def golang_structs(package):
def netdb_datatype_to_go_ptr(a):
if a.is_nullable:
......@@ -443,7 +443,8 @@ def golang_structs(package):
print(f'Unknown datatype "{n["name"]}" (def: {n})! Exiting.', file=sys.stderr)
exit(1)
print(f"package {package}\n")
if package is not None:
print(f"package {package}\n")
print('import "net"\n')
for o in loader.api_objects.values():
cap_fq = ''.join([t[0].upper() + t[1:] if len(t) >= 2 else t for t in o.fq_name.split('.')])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment