From 76f9adb5991081e27ebc6eec82db6bdba36c910f Mon Sep 17 00:00:00 2001 From: Andrew Gallant Date: Sat, 28 Dec 2013 10:13:20 -0500 Subject: Use consistent extension names. Close #6. --- nexgb/xgbgen/go_request_reply.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'nexgb/xgbgen') diff --git a/nexgb/xgbgen/go_request_reply.go b/nexgb/xgbgen/go_request_reply.go index ee5c974..a2c6d9c 100644 --- a/nexgb/xgbgen/go_request_reply.go +++ b/nexgb/xgbgen/go_request_reply.go @@ -79,8 +79,7 @@ func (r *Request) CheckExt(c *Context) { if !c.protocol.isExt() { return } - c.Putln("if _, ok := c.Extensions[\"%s\"]; !ok {", - strings.ToUpper(c.protocol.ExtXName)) + c.Putln("if _, ok := c.Extensions[\"%s\"]; !ok {", c.protocol.ExtXName) c.Putln("panic(\"Cannot issue request '%s' using the uninitialized "+ "extension '%s'. %s.Init(connObj) must be called first.\")", r.SrcName(), c.protocol.ExtXName, c.protocol.PkgName()) @@ -155,8 +154,7 @@ func (r *Request) WriteRequest(c *Context) { c.Putln("buf := make([]byte, size)") c.Putln("") if c.protocol.isExt() { - c.Putln("buf[b] = c.Extensions[\"%s\"]", - strings.ToUpper(c.protocol.ExtXName)) + c.Putln("buf[b] = c.Extensions[\"%s\"]", c.protocol.ExtXName) c.Putln("b += 1") c.Putln("") } -- cgit v1.2.3