]> git.lizzy.rs Git - mt.git/blob - cmdno.sh
Add WaitGroup to SerializePkt
[mt.git] / cmdno.sh
1 #!/bin/sh
2
3 (
4         echo '// Code generated by cmdno.sh; DO NOT EDIT.'
5         echo
6         echo package mt
7         echo
8         awk '{ print "func (*'$2'"$2") '$3'CmdNo() '$4' { return "$1" }" }' $1
9         echo
10         echo "var $6 = map[$4]func() $5{"
11         awk '{ print "\t"$1": func() '$5' { return new('$2'"$2") }," }' $1
12         echo }
13 ) | gofmt >$1_cmdno.go