mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-20 02:00:11 -08:00
review fix
This commit is contained in:
parent
2a33c1483b
commit
a1bbe0c7f2
4 changed files with 13 additions and 15 deletions
|
|
@ -15,12 +15,6 @@ from collections import namedtuple
|
|||
CapDef = namedtuple("CapDef", ['identifier', 'name', 'url', 'standard'])
|
||||
|
||||
CAPDEFS = [
|
||||
CapDef(
|
||||
identifier="LabelTagName",
|
||||
name="draft/label",
|
||||
url="https://ircv3.net/specs/extensions/labeled-response.html",
|
||||
standard="draft IRCv3 tag name",
|
||||
),
|
||||
CapDef(
|
||||
identifier="AccountNotify",
|
||||
name="account-notify",
|
||||
|
|
@ -188,11 +182,13 @@ const (
|
|||
print(file=output)
|
||||
print(")", file=output)
|
||||
|
||||
print("// `capabilityNames[capab]` is the string name of the capability `capab`", file=output)
|
||||
print("""var ( capabilityNames = [numCapabs]string{""", file=output)
|
||||
for capdef in CAPDEFS:
|
||||
print("\"%s\"," % (capdef.name,), file=output)
|
||||
print("})", file=output)
|
||||
|
||||
# run the generated code through `gofmt -s`, which will print it to stdout
|
||||
gofmt = subprocess.Popen(['gofmt', '-s'], stdin=subprocess.PIPE)
|
||||
gofmt.communicate(input=output.getvalue().encode('utf-8'))
|
||||
if gofmt.poll() != 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue