xP: implement tab completion
Currently it only goes for the longest common prefix. Refactor WebSocket handling into an abstraction for our protocol. The Go code generater finally needed fixing.
This commit is contained in:
@@ -382,7 +382,8 @@ function codegen_union(name, cg, gotype, tagfield, tagvar) {
|
||||
print "}"
|
||||
print ""
|
||||
|
||||
print "func (u *" gotype ") MarshalJSON() ([]byte, error) {"
|
||||
# This cannot be a pointer method, it wouldn't work recursively.
|
||||
print "func (u " gotype ") MarshalJSON() ([]byte, error) {"
|
||||
print "\treturn json.Marshal(u.Interface)"
|
||||
print "}"
|
||||
print ""
|
||||
|
||||
Reference in New Issue
Block a user