hid: rename to xS before merge into xK
This commit is contained in:
16
xS/xS-gen-replies.awk
Executable file
16
xS/xS-gen-replies.awk
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/awk -f
|
||||
/^[0-9]+ *(ERR|RPL)_[A-Z]+ *".*"$/ {
|
||||
match($0, /".*"/);
|
||||
ids[$1] = $2;
|
||||
texts[$2] = substr($0, RSTART, RLENGTH);
|
||||
}
|
||||
|
||||
END {
|
||||
print "package " ENVIRON["GOPACKAGE"] "\n\nconst ("
|
||||
for (i in ids)
|
||||
printf("\t%s = %s\n", ids[i], i)
|
||||
print ")\n\nvar defaultReplies = map[int]string{"
|
||||
for (i in ids)
|
||||
print "\t" ids[i] ": " texts[ids[i]] ","
|
||||
print "}"
|
||||
}
|
||||
Reference in New Issue
Block a user