1
0
Fork 0
forked from External/ergo

review fix

This commit is contained in:
Shivaram Lingamneni 2018-06-25 22:50:57 -04:00
parent 2a33c1483b
commit a1bbe0c7f2
4 changed files with 13 additions and 15 deletions

View file

@ -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: