qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject qpid-proton git commit: NO-JIRA: go: remove dead code, rename *Setting to *Option to be consistent with other bindings.
Date Fri, 23 Oct 2015 22:14:23 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master 6d7f12dc5 -> e073fad0a


NO-JIRA: go: remove dead code, rename *Setting to *Option to be consistent with other bindings.


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/e073fad0
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/e073fad0
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/e073fad0

Branch: refs/heads/master
Commit: e073fad0ab14d27012c2cb4ae640b46068b50489
Parents: 6d7f12d
Author: Alan Conway <aconway@redhat.com>
Authored: Fri Oct 23 17:11:00 2015 -0400
Committer: Alan Conway <aconway@redhat.com>
Committed: Fri Oct 23 18:13:12 2015 -0400

----------------------------------------------------------------------
 proton-c/bindings/go/CMakeLists.txt             |   8 +-
 proton-c/bindings/go/genwrap.go                 |   3 +-
 .../go/src/qpid.apache.org/amqp/error.go        |  37 ++++++
 .../go/src/qpid.apache.org/amqp/marshal.go      |  10 +-
 .../go/src/qpid.apache.org/amqp/message.go      |   9 +-
 .../go/src/qpid.apache.org/amqp/unmarshal.go    |  35 +++---
 .../bindings/go/src/qpid.apache.org/amqp/url.go |   6 +-
 .../go/src/qpid.apache.org/amqp/url_test.go     |   2 +-
 .../src/qpid.apache.org/electron/connection.go  |  33 ++----
 .../src/qpid.apache.org/electron/container.go   |  20 ++--
 .../go/src/qpid.apache.org/electron/endpoint.go |   3 +-
 .../go/src/qpid.apache.org/electron/error.go    |  35 ++++++
 .../go/src/qpid.apache.org/electron/link.go     |  29 +++--
 .../qpid.apache.org/electron/messaging_test.go  |   4 +-
 .../go/src/qpid.apache.org/electron/receiver.go |   8 +-
 .../go/src/qpid.apache.org/electron/sender.go   |   5 +-
 .../go/src/qpid.apache.org/electron/session.go  |  26 ++--
 .../go/src/qpid.apache.org/electron/time.go     |   4 +-
 .../go/src/qpid.apache.org/internal/error.go    | 118 -------------------
 .../src/qpid.apache.org/internal/flexchannel.go |  82 -------------
 .../internal/flexchannel_test.go                |  89 --------------
 .../go/src/qpid.apache.org/internal/safemap.go  |  57 ---------
 .../go/src/qpid.apache.org/internal/uuid.go     |  70 -----------
 .../go/src/qpid.apache.org/proton/engine.go     |  20 ++--
 .../go/src/qpid.apache.org/proton/error.go      |  96 +++++++++++++++
 .../go/src/qpid.apache.org/proton/handlers.go   |   7 +-
 .../go/src/qpid.apache.org/proton/message.go    |  29 +++--
 .../go/src/qpid.apache.org/proton/uuid.go       |  57 +++++++++
 .../go/src/qpid.apache.org/proton/wrappers.go   |  15 +--
 .../src/qpid.apache.org/proton/wrappers_gen.go  |   9 +-
 30 files changed, 357 insertions(+), 569 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/CMakeLists.txt b/proton-c/bindings/go/CMakeLists.txt
index 74c7e13..b1ed962 100644
--- a/proton-c/bindings/go/CMakeLists.txt
+++ b/proton-c/bindings/go/CMakeLists.txt
@@ -45,7 +45,7 @@ set(GO_ENV ${env_py} --
 set(GO ${GO_ENV} ${GO_EXE} CACHE INTERNAL "Run go with environment set")
 
 set(GO_BUILD ${GO} build ${GO_BUILD_FLAGS} ${GO_RPATH_FLAGS} CACHE INTERNAL "Run go build")
-set(GO_INSTALL ${GO} install ${GO_BUILD_FLAGS} CACHE INTERNAL "Run go install")
+set(GO_INSTALL ${GO} install ${GO_BUILD_FLAGS} CACHE INTERNAL "Run go install" )
 set(GO_TEST ${GO} test ${GO_BUILD_FLAGS} ${GO_RPATH_FLAGS} ${GO_TEST_FLAGS} CACHE INTERNAL "Run go test")
 
 # Go build depends on the C headers
@@ -76,7 +76,8 @@ foreach (pkg amqp proton electron)
 
   # Build the package library
   add_custom_command(
-    OUTPUT ${lib} COMMAND ${GO_INSTALL} ${package} DEPENDS ${sources} ${cdepends}
+    OUTPUT ${lib} COMMAND ${GO_INSTALL} ${package}
+    DEPENDS ${sources} ${cdepends}
     WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
   set(target go-package-${pkg})
   add_custom_target(${target} ALL DEPENDS ${lib})
@@ -86,7 +87,8 @@ foreach (pkg amqp proton electron)
   set(test_exe ${CMAKE_CURRENT_BINARY_DIR}/${pkg}.test)
   add_custom_command(
     OUTPUT ${test_exe} COMMAND ${GO_TEST} -c -o ${test_exe} ${package}
-    DEPENDS ${target} qpid-proton)
+    DEPENDS ${sources} ${cdepends} qpid-proton
+    WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
   add_custom_target(go-package-test-${pkg} ALL DEPENDS ${test_exe})
   add_test(NAME go_test_${pkg} COMMAND ${test_exe} WORKING_DIRECTORY ${dir})
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/genwrap.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/genwrap.go b/proton-c/bindings/go/genwrap.go
index dd2780c..fe383a9 100644
--- a/proton-c/bindings/go/genwrap.go
+++ b/proton-c/bindings/go/genwrap.go
@@ -52,7 +52,6 @@ package proton
 import (
 	"time"
   "unsafe"
-  "qpid.apache.org/proton/internal"
 )
 
 // #include <proton/types.h>
@@ -322,7 +321,7 @@ func mapType(ctype string) (g genType) {
 		g.ToGo = func(v string) string { return fmt.Sprintf("goTime(%s)", v) }
 	case "C.pn_error_t *":
 		g.Gotype = "error"
-		g.ToGo = func(v string) string { return fmt.Sprintf("internal.PnError(unsafe.Pointer(%s))", v) }
+		g.ToGo = func(v string) string { return fmt.Sprintf("PnError(%s)", v) }
 	default:
 		pnId := regexp.MustCompile(" *pn_([a-z_]+)_t *\\*? *")
 		match := pnId.FindStringSubmatch(g.Ctype)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/amqp/error.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/amqp/error.go b/proton-c/bindings/go/src/qpid.apache.org/amqp/error.go
index 868dbf3..4096cdc 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/amqp/error.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/amqp/error.go
@@ -19,6 +19,9 @@ under the License.
 
 package amqp
 
+// #include <proton/error.h>
+import "C"
+
 import (
 	"fmt"
 	"reflect"
@@ -64,3 +67,37 @@ var (
 	IllegalState       = "amqp:illegal-state"
 	FrameSizeTooSmall  = "amqp:frame-size-too-small"
 )
+
+type PnErrorCode int
+
+func (e PnErrorCode) String() string {
+	switch e {
+	case C.PN_EOS:
+		return "end-of-data"
+	case C.PN_ERR:
+		return "error"
+	case C.PN_OVERFLOW:
+		return "overflow"
+	case C.PN_UNDERFLOW:
+		return "underflow"
+	case C.PN_STATE_ERR:
+		return "bad-state"
+	case C.PN_ARG_ERR:
+		return "invalid-argument"
+	case C.PN_TIMEOUT:
+		return "timeout"
+	case C.PN_INTR:
+		return "interrupted"
+	case C.PN_INPROGRESS:
+		return "in-progress"
+	default:
+		return fmt.Sprintf("unknown-error(%d)", e)
+	}
+}
+
+func PnError(e *C.pn_error_t) error {
+	if e == nil || C.pn_error_code(e) == 0 {
+		return nil
+	}
+	return fmt.Errorf("%s: %s", PnErrorCode(C.pn_error_code(e)), C.GoString(C.pn_error_text(e)))
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/amqp/marshal.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/amqp/marshal.go b/proton-c/bindings/go/src/qpid.apache.org/amqp/marshal.go
index 666b4f6..9930e13 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/amqp/marshal.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/amqp/marshal.go
@@ -23,16 +23,16 @@ package amqp
 import "C"
 
 import (
+	"fmt"
 	"io"
-	"qpid.apache.org/internal"
 	"reflect"
 	"unsafe"
 )
 
 func dataError(prefix string, data *C.pn_data_t) error {
-	err := internal.PnError(unsafe.Pointer(C.pn_data_error(data)))
+	err := PnError(C.pn_data_error(data))
 	if err != nil {
-		err = internal.Errorf("%s: %s", prefix, err.(internal.Error))
+		err = fmt.Errorf("%s: %s", prefix, err.Error())
 	}
 	return err
 }
@@ -108,7 +108,7 @@ func Marshal(v interface{}, buffer []byte) (outbuf []byte, err error) {
 const minEncode = 256
 
 // overflow is returned when an encoding function can't fit data in the buffer.
-var overflow = internal.Errorf("buffer too small")
+var overflow = fmt.Errorf("buffer too small")
 
 // encodeFn encodes into buffer[0:len(buffer)].
 // Returns buffer with length adjusted for data encoded.
@@ -189,7 +189,7 @@ func marshal(v interface{}, data *C.pn_data_t) {
 		case reflect.Slice:
 			putList(data, v)
 		default:
-			panic(internal.Errorf("cannot marshal %s to AMQP", reflect.TypeOf(v)))
+			panic(fmt.Errorf("cannot marshal %s to AMQP", reflect.TypeOf(v)))
 		}
 	}
 	err := dataError("marshal", data)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/amqp/message.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/amqp/message.go b/proton-c/bindings/go/src/qpid.apache.org/amqp/message.go
index 5ba4f4f..e36c6f2 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/amqp/message.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/amqp/message.go
@@ -35,7 +35,7 @@ package amqp
 import "C"
 
 import (
-	"qpid.apache.org/internal"
+	"fmt"
 	"runtime"
 	"time"
 	"unsafe"
@@ -313,11 +313,10 @@ func (m *message) Body() (v interface{})   { m.Unmarshal(&v); return }
 func (m *message) Decode(data []byte) error {
 	m.Clear()
 	if len(data) == 0 {
-		return internal.Errorf("empty buffer for decode")
+		return fmt.Errorf("empty buffer for decode")
 	}
 	if C.pn_message_decode(m.pn, cPtr(data), cLen(data)) < 0 {
-		return internal.Errorf("decoding message: %s",
-			internal.PnError(unsafe.Pointer(C.pn_message_error(m.pn))))
+		return fmt.Errorf("decoding message: %s", PnError(C.pn_message_error(m.pn)))
 	}
 	return nil
 }
@@ -336,7 +335,7 @@ func (m *message) Encode(buffer []byte) ([]byte, error) {
 		case result == C.PN_OVERFLOW:
 			return buf, overflow
 		case result < 0:
-			return buf, internal.Errorf("cannot encode message: %s", internal.PnErrorCode(result))
+			return buf, fmt.Errorf("cannot encode message: %s", PnErrorCode(result))
 		default:
 			return buf[:len], nil
 		}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/amqp/unmarshal.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/amqp/unmarshal.go b/proton-c/bindings/go/src/qpid.apache.org/amqp/unmarshal.go
index 751921d..dc658b2 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/amqp/unmarshal.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/amqp/unmarshal.go
@@ -26,7 +26,6 @@ import (
 	"bytes"
 	"fmt"
 	"io"
-	"qpid.apache.org/internal"
 	"reflect"
 	"unsafe"
 )
@@ -47,9 +46,9 @@ func newUnmarshalError(pnType C.pn_type_t, v interface{}) *UnmarshalError {
 
 func (e UnmarshalError) Error() string {
 	if e.GoType.Kind() != reflect.Ptr {
-		return fmt.Sprintf("proton: cannot unmarshal to type %s, not a pointer", e.GoType)
+		return fmt.Sprintf("cannot unmarshal to type %s, not a pointer", e.GoType)
 	} else {
-		return fmt.Sprintf("proton: cannot unmarshal AMQP %s to %s", e.AMQPType, e.GoType)
+		return fmt.Sprintf("cannot unmarshal AMQP %s to %s", e.AMQPType, e.GoType)
 	}
 }
 
@@ -57,8 +56,8 @@ func doRecover(err *error) {
 	r := recover()
 	switch r := r.(type) {
 	case nil:
-	case *UnmarshalError, internal.Error:
-		*err = r.(error)
+	case *UnmarshalError:
+		*err = r
 	default:
 		panic(r)
 	}
@@ -104,8 +103,11 @@ func (d *Decoder) Decode(v interface{}) (err error) {
 	data := C.pn_data(0)
 	defer C.pn_data_free(data)
 	var n int
-	for n == 0 && err == nil {
-		n = decode(data, d.buffer.Bytes())
+	for n == 0 {
+		n, err = decode(data, d.buffer.Bytes())
+		if err != nil {
+			return err
+		}
 		if n == 0 { // n == 0 means not enough data, read more
 			err = d.more()
 		} else {
@@ -183,13 +185,16 @@ func Unmarshal(bytes []byte, v interface{}) (n int, err error) {
 
 	data := C.pn_data(0)
 	defer C.pn_data_free(data)
-	n = decode(data, bytes)
+	n, err = decode(data, bytes)
+	if err != nil {
+		return 0, err
+	}
 	if n == 0 {
-		err = internal.Errorf("not enough data")
+		return 0, fmt.Errorf("not enough data")
 	} else {
 		unmarshal(v, data)
 	}
-	return
+	return n, nil
 }
 
 // more reads more data when we can't parse a complete AMQP type
@@ -543,16 +548,16 @@ func getList(data *C.pn_data_t, v interface{}) {
 // decode from bytes.
 // Return bytes decoded or 0 if we could not decode a complete object.
 //
-func decode(data *C.pn_data_t, bytes []byte) int {
+func decode(data *C.pn_data_t, bytes []byte) (int, error) {
 	if len(bytes) == 0 {
-		return 0
+		return 0, nil
 	}
 	n := int(C.pn_data_decode(data, cPtr(bytes), cLen(bytes)))
 	if n == int(C.PN_UNDERFLOW) {
 		C.pn_error_clear(C.pn_data_error(data))
-		return 0
+		return 0, nil
 	} else if n <= 0 {
-		panic(internal.Errorf("unmarshal %s", internal.PnErrorCode(n)))
+		return 0, fmt.Errorf("unmarshal %s", PnErrorCode(n))
 	}
-	return n
+	return n, nil
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/amqp/url.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/amqp/url.go b/proton-c/bindings/go/src/qpid.apache.org/amqp/url.go
index 0d0c662..70545d2 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/amqp/url.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/amqp/url.go
@@ -33,9 +33,9 @@ inline void	set(pn_url_t *url, setter_fn s, const char* value) {
 import "C"
 
 import (
+	"fmt"
 	"net"
 	"net/url"
-	"qpid.apache.org/internal"
 	"unsafe"
 )
 
@@ -54,7 +54,7 @@ func ParseURL(s string) (u *url.URL, err error) {
 	defer C.free(unsafe.Pointer(cstr))
 	pnUrl := C.pn_url_parse(cstr)
 	if pnUrl == nil {
-		return nil, internal.Errorf("bad URL %#v", s)
+		return nil, fmt.Errorf("bad URL %#v", s)
 	}
 	defer C.pn_url_free(pnUrl)
 
@@ -66,7 +66,7 @@ func ParseURL(s string) (u *url.URL, err error) {
 	path := C.GoString(C.pn_url_get_path(pnUrl))
 
 	if err != nil {
-		return nil, internal.Errorf("bad URL %#v: %s", s, err)
+		return nil, fmt.Errorf("bad URL %#v: %s", s, err)
 	}
 	if scheme == "" {
 		scheme = amqp

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/amqp/url_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/amqp/url_test.go b/proton-c/bindings/go/src/qpid.apache.org/amqp/url_test.go
index f80f1c4..99b656d 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/amqp/url_test.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/amqp/url_test.go
@@ -47,5 +47,5 @@ func ExampleParseURL() {
 	// amqp://:1234
 	// amqp://host:amqp/path
 	// amqps://host:amqps
-	// proton: bad URL ""
+	// bad URL ""
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go b/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go
index 6e62a1b..8573f28 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/connection.go
@@ -25,7 +25,6 @@ import "C"
 import (
 	"net"
 	"qpid.apache.org/amqp"
-	"qpid.apache.org/internal"
 	"qpid.apache.org/proton"
 	"sync"
 	"time"
@@ -36,24 +35,17 @@ type Connection interface {
 	Endpoint
 
 	// Sender opens a new sender on the DefaultSession.
-	//
-	// v can be a string, which is used as the Target address, or a SenderSettings
-	// struct containing more details settings.
-	Sender(...LinkSetting) (Sender, error)
+	Sender(...LinkOption) (Sender, error)
 
 	// Receiver opens a new Receiver on the DefaultSession().
-	//
-	// v can be a string, which is used as the
-	// Source address, or a ReceiverSettings struct containing more details
-	// settings.
-	Receiver(...LinkSetting) (Receiver, error)
+	Receiver(...LinkOption) (Receiver, error)
 
 	// DefaultSession() returns a default session for the connection. It is opened
 	// on the first call to DefaultSession and returned on subsequent calls.
 	DefaultSession() (Session, error)
 
 	// Session opens a new session.
-	Session(...SessionSetting) (Session, error)
+	Session(...SessionOption) (Session, error)
 
 	// Container for the connection.
 	Container() Container
@@ -68,9 +60,8 @@ type Connection interface {
 	WaitTimeout(time.Duration) error
 }
 
-// ConnectionSetting can be passed when creating a connection.
-// See functions that return ConnectionSetting for details
-type ConnectionSetting func(*connection)
+// ConnectionOption can be passed when creating a connection.
+type ConnectionOption func(*connection)
 
 // Server setting puts the connection in server mode.
 //
@@ -78,7 +69,7 @@ type ConnectionSetting func(*connection)
 // connection. Normally you would call this for a connection created by
 // net.Listener.Accept()
 //
-func Server() ConnectionSetting { return func(c *connection) { c.engine.Server() } }
+func Server() ConnectionOption { return func(c *connection) { c.engine.Server() } }
 
 // Accepter provides a function to be called when a connection receives an incoming
 // request to open an endpoint, one of IncomingSession, IncomingSender or IncomingReceiver.
@@ -87,7 +78,7 @@ func Server() ConnectionSetting { return func(c *connection) { c.engine.Server()
 // It can pass the endpoint to another goroutine for processing.
 //
 // By default all incoming endpoints are rejected.
-func Accepter(accept func(Incoming)) ConnectionSetting {
+func Accepter(accept func(Incoming)) ConnectionOption {
 	return func(c *connection) { c.accept = accept }
 }
 
@@ -100,14 +91,14 @@ type connection struct {
 	accept      func(Incoming)
 	handler     *handler
 	engine      *proton.Engine
-	err         internal.ErrorHolder
+	err         proton.ErrorHolder
 	eConnection proton.Connection
 
 	defaultSession Session
 	done           chan struct{}
 }
 
-func newConnection(conn net.Conn, cont *container, setting ...ConnectionSetting) (*connection, error) {
+func newConnection(conn net.Conn, cont *container, setting ...ConnectionOption) (*connection, error) {
 	c := &connection{container: cont, conn: conn, accept: func(Incoming) {}, done: make(chan struct{})}
 	c.handler = newHandler(c)
 	var err error
@@ -128,7 +119,7 @@ func (c *connection) Close(err error) { c.err.Set(err); c.engine.Close(err) }
 
 func (c *connection) Disconnect(err error) { c.err.Set(err); c.engine.Disconnect(err) }
 
-func (c *connection) Session(setting ...SessionSetting) (Session, error) {
+func (c *connection) Session(setting ...SessionOption) (Session, error) {
 	var s Session
 	err := c.engine.InjectWait(func() error {
 		eSession, err := c.engine.Connection().Session()
@@ -155,7 +146,7 @@ func (c *connection) DefaultSession() (s Session, err error) {
 	return c.defaultSession, err
 }
 
-func (c *connection) Sender(setting ...LinkSetting) (Sender, error) {
+func (c *connection) Sender(setting ...LinkOption) (Sender, error) {
 	if s, err := c.DefaultSession(); err == nil {
 		return s.Sender(setting...)
 	} else {
@@ -163,7 +154,7 @@ func (c *connection) Sender(setting ...LinkSetting) (Sender, error) {
 	}
 }
 
-func (c *connection) Receiver(setting ...LinkSetting) (Receiver, error) {
+func (c *connection) Receiver(setting ...LinkOption) (Receiver, error) {
 	if s, err := c.DefaultSession(); err == nil {
 		return s.Receiver(setting...)
 	} else {

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/electron/container.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/container.go b/proton-c/bindings/go/src/qpid.apache.org/electron/container.go
index 7bbc4b0..b5ce6c0 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/electron/container.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/container.go
@@ -21,7 +21,9 @@ package electron
 
 import (
 	"net"
-	"qpid.apache.org/internal"
+	"qpid.apache.org/proton"
+	"strconv"
+	"sync/atomic"
 )
 
 // Container is an AMQP container, it represents a single AMQP "application".It
@@ -39,12 +41,16 @@ type Container interface {
 	// setting any Connection properties you need to set. Note the net.Conn
 	// can be an outgoing connection (e.g. made with net.Dial) or an incoming
 	// connection (e.g. made with net.Listener.Accept())
-	Connection(net.Conn, ...ConnectionSetting) (Connection, error)
+	Connection(net.Conn, ...ConnectionOption) (Connection, error)
 }
 
 type container struct {
-	id        string
-	linkNames internal.IdCounter
+	id         string
+	tagCounter uint64
+}
+
+func (cont *container) nextTag() string {
+	return strconv.FormatUint(atomic.AddUint64(&cont.tagCounter, 1), 32)
 }
 
 // NewContainer creates a new container. The id must be unique in your
@@ -54,7 +60,7 @@ type container struct {
 // If id == "" a random UUID will be generated for the id.
 func NewContainer(id string) Container {
 	if id == "" {
-		id = internal.UUID4().String()
+		id = proton.UUID4().String()
 	}
 	cont := &container{id: id}
 	return cont
@@ -63,9 +69,9 @@ func NewContainer(id string) Container {
 func (cont *container) Id() string { return cont.id }
 
 func (cont *container) nextLinkName() string {
-	return cont.id + "@" + cont.linkNames.Next()
+	return cont.id + "@" + cont.nextTag()
 }
 
-func (cont *container) Connection(conn net.Conn, setting ...ConnectionSetting) (Connection, error) {
+func (cont *container) Connection(conn net.Conn, setting ...ConnectionOption) (Connection, error) {
 	return newConnection(conn, cont, setting...)
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/electron/endpoint.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/endpoint.go b/proton-c/bindings/go/src/qpid.apache.org/electron/endpoint.go
index 745fd04..057e572 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/electron/endpoint.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/endpoint.go
@@ -21,7 +21,6 @@ package electron
 
 import (
 	"io"
-	"qpid.apache.org/internal"
 	"qpid.apache.org/proton"
 )
 
@@ -52,7 +51,7 @@ type Endpoint interface {
 }
 
 type endpoint struct {
-	err internal.ErrorHolder
+	err proton.ErrorHolder
 	str string // Must be set by the value that embeds endpoint.
 }
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/electron/error.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/error.go b/proton-c/bindings/go/src/qpid.apache.org/electron/error.go
new file mode 100644
index 0000000..4dcfd94
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/error.go
@@ -0,0 +1,35 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package electron
+
+import (
+	"fmt"
+)
+
+// assert panics if condition is false with optional formatted message
+func assert(condition bool, format ...interface{}) {
+	if !condition {
+		if len(format) > 0 {
+			panic(fmt.Errorf(format[0].(string), format[1:]...))
+		} else {
+			panic(fmt.Errorf("assertion failed"))
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/electron/link.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/link.go b/proton-c/bindings/go/src/qpid.apache.org/electron/link.go
index 4bef53b..4835cb9 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/electron/link.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/link.go
@@ -20,7 +20,7 @@ under the License.
 package electron
 
 import (
-	"qpid.apache.org/internal"
+	"fmt"
 	"qpid.apache.org/proton"
 )
 
@@ -60,38 +60,37 @@ type Link interface {
 	open()
 }
 
-// LinkSetting can be passed when creating a sender or receiver.
-// See functions that return LinkSetting for details
-type LinkSetting func(*link)
+// LinkOption can be passed when creating a sender or receiver link.
+type LinkOption func(*link)
 
 // Source sets address that messages are coming from.
-func Source(s string) LinkSetting { return func(l *link) { l.source = s } }
+func Source(s string) LinkOption { return func(l *link) { l.source = s } }
 
 // Target sets address that messages are going to.
-func Target(s string) LinkSetting { return func(l *link) { l.target = s } }
+func Target(s string) LinkOption { return func(l *link) { l.target = s } }
 
 // LinkName sets the link name.
-func LinkName(s string) LinkSetting { return func(l *link) { l.target = s } }
+func LinkName(s string) LinkOption { return func(l *link) { l.target = s } }
 
 // SndSettle sets the send settle mode
-func SndSettle(m SndSettleMode) LinkSetting { return func(l *link) { l.sndSettle = m } }
+func SndSettle(m SndSettleMode) LinkOption { return func(l *link) { l.sndSettle = m } }
 
 // RcvSettle sets the send settle mode
-func RcvSettle(m RcvSettleMode) LinkSetting { return func(l *link) { l.rcvSettle = m } }
+func RcvSettle(m RcvSettleMode) LinkOption { return func(l *link) { l.rcvSettle = m } }
 
 // SndSettleMode defines when the sending end of the link settles message delivery.
 type SndSettleMode proton.SndSettleMode
 
 // Capacity sets the link capacity
-func Capacity(n int) LinkSetting { return func(l *link) { l.capacity = n } }
+func Capacity(n int) LinkOption { return func(l *link) { l.capacity = n } }
 
 // Prefetch sets a receivers pre-fetch flag. Not relevant for a sender.
-func Prefetch(p bool) LinkSetting { return func(l *link) { l.prefetch = p } }
+func Prefetch(p bool) LinkOption { return func(l *link) { l.prefetch = p } }
 
 // AtMostOnce sets "fire and forget" mode, messages are sent but no
 // acknowledgment is received, messages can be lost if there is a network
 // failure. Sets SndSettleMode=SendSettled and RcvSettleMode=RcvFirst
-func AtMostOnce() LinkSetting {
+func AtMostOnce() LinkOption {
 	return func(l *link) {
 		SndSettle(SndSettled)(l)
 		RcvSettle(RcvFirst)(l)
@@ -103,7 +102,7 @@ func AtMostOnce() LinkSetting {
 // failure, unacknowledged messages can be re-sent but there is a chance
 // that the message will be received twice in this case.
 // Sets SndSettleMode=SndUnsettled and RcvSettleMode=RcvFirst
-func AtLeastOnce() LinkSetting {
+func AtLeastOnce() LinkOption {
 	return func(l *link) {
 		SndSettle(SndUnsettled)(l)
 		RcvSettle(RcvFirst)(l)
@@ -161,7 +160,7 @@ func (l *link) engine() *proton.Engine { return l.session.connection.engine }
 func (l *link) handler() *handler      { return l.session.connection.handler }
 
 // Set up link fields and open the proton.Link
-func localLink(sn *session, isSender bool, setting ...LinkSetting) (link, error) {
+func localLink(sn *session, isSender bool, setting ...LinkOption) (link, error) {
 	l := link{
 		session:  sn,
 		isSender: isSender,
@@ -181,7 +180,7 @@ func localLink(sn *session, isSender bool, setting ...LinkSetting) (link, error)
 		l.eLink = l.session.eSession.Receiver(l.linkName)
 	}
 	if l.eLink.IsNil() {
-		l.err.Set(internal.Errorf("cannot create link %s", l))
+		l.err.Set(fmt.Errorf("cannot create link %s", l))
 		return l, l.err.Get()
 	}
 	l.eLink.Source().SetAddress(l.source)

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/electron/messaging_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/messaging_test.go b/proton-c/bindings/go/src/qpid.apache.org/electron/messaging_test.go
index 6523d27..c7ff290 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/electron/messaging_test.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/messaging_test.go
@@ -386,7 +386,7 @@ func TestConnectionCloseInterrupt1(t *testing.T) {
 	for i := 0; i < 3; i++ {
 		if r := <-results; want != r.err {
 			// TODO aconway 2015-10-06: Not propagating the correct error, seeing nil and EOF.
-			t.Logf("want %v got %v", want, r)
+			t.Logf("want %v got %v", want, r.err)
 		}
 	}
 }
@@ -411,7 +411,7 @@ func TestConnectionCloseInterrupt2(t *testing.T) {
 	for i := 0; i < 3; i++ {
 		if r := <-results; want != r.err {
 			// TODO aconway 2015-10-06: Not propagating the correct error, seeing nil.
-			t.Logf("want %v got %v", want, r)
+			t.Logf("want %v got %v", want, r.err)
 		}
 	}
 }

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/electron/receiver.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/receiver.go b/proton-c/bindings/go/src/qpid.apache.org/electron/receiver.go
index 59ac018..9f854cf 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/electron/receiver.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/receiver.go
@@ -20,8 +20,8 @@ under the License.
 package electron
 
 import (
+	"fmt"
 	"qpid.apache.org/amqp"
-	"qpid.apache.org/internal"
 	"qpid.apache.org/proton"
 	"time"
 )
@@ -148,7 +148,7 @@ func (r *receiver) Receive() (rm ReceivedMessage, err error) {
 }
 
 func (r *receiver) ReceiveTimeout(timeout time.Duration) (rm ReceivedMessage, err error) {
-	internal.Assert(r.buffer != nil, "Receiver is not open: %s", r)
+	assert(r.buffer != nil, "Receiver is not open: %s", r)
 	r.policy.Pre(r)
 	defer func() { r.policy.Post(r, err) }()
 	rmi, err := timedReceive(r.buffer, timeout)
@@ -174,10 +174,10 @@ func (r *receiver) message(delivery proton.Delivery) {
 			localClose(r.eLink, err)
 			return
 		}
-		internal.Assert(m != nil)
+		assert(m != nil)
 		r.eLink.Advance()
 		if r.eLink.Credit() < 0 {
-			localClose(r.eLink, internal.Errorf("received message in excess of credit limit"))
+			localClose(r.eLink, fmt.Errorf("received message in excess of credit limit"))
 		} else {
 			// We never issue more credit than cap(buffer) so this will not block.
 			r.buffer <- ReceivedMessage{m, delivery, r}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/electron/sender.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/sender.go b/proton-c/bindings/go/src/qpid.apache.org/electron/sender.go
index 68cfbb3..98304c1 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/electron/sender.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/sender.go
@@ -24,7 +24,6 @@ import "C"
 
 import (
 	"qpid.apache.org/amqp"
-	"qpid.apache.org/internal"
 	"qpid.apache.org/proton"
 	"reflect"
 	"time"
@@ -129,7 +128,7 @@ func (s *sender) sendInternal(snd sendMessage, timeout time.Duration) (SentMessa
 	if _, err := timedReceive(s.credit, timeout); err != nil { // Wait for credit
 		if err == Closed {
 			err = s.Error()
-			internal.Assert(err != nil)
+			assert(err != nil)
 		}
 		return nil, err
 	}
@@ -153,7 +152,7 @@ func (s *sender) doSend(snd sendMessage) {
 			s.handler().sentMessages[delivery] = sm
 		}
 	default:
-		internal.Assert(false, "bad SentMessage type %T", snd.sm)
+		assert(false, "bad SentMessage type %T", snd.sm)
 	}
 	if s.eLink.Credit() > 0 {
 		s.sendable() // Signal credit.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/electron/session.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/session.go b/proton-c/bindings/go/src/qpid.apache.org/electron/session.go
index 3531da6..785a582 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/electron/session.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/session.go
@@ -27,14 +27,11 @@ import (
 type Session interface {
 	Endpoint
 
-	// Sender opens a new sender. v can be a string, which is used as the Target
-	// address, or a SenderSettings struct containing more details settings.
-	Sender(...LinkSetting) (Sender, error)
-
-	// Receiver opens a new Receiver. v can be a string, which is used as the
-	// Source address, or a ReceiverSettings struct containing more details
-	// settings.
-	Receiver(...LinkSetting) (Receiver, error)
+	// Sender opens a new sender.
+	Sender(...LinkOption) (Sender, error)
+
+	// Receiver opens a new Receiver.
+	Receiver(...LinkOption) (Receiver, error)
 }
 
 type session struct {
@@ -44,15 +41,14 @@ type session struct {
 	capacity   uint
 }
 
-// SessionSetting can be passed when creating a sender or receiver.
-// See functions that return SessionSetting for details
-type SessionSetting func(*session)
+// SessionOption can be passed when creating a Session
+type SessionOption func(*session)
 
 // IncomingCapacity sets the size (in bytes) of the sessions incoming data buffer..
-func IncomingCapacity(cap uint) SessionSetting { return func(s *session) { s.capacity = cap } }
+func IncomingCapacity(cap uint) SessionOption { return func(s *session) { s.capacity = cap } }
 
 // in proton goroutine
-func newSession(c *connection, es proton.Session, setting ...SessionSetting) *session {
+func newSession(c *connection, es proton.Session, setting ...SessionOption) *session {
 	s := &session{
 		connection: c,
 		eSession:   es,
@@ -76,7 +72,7 @@ func (s *session) Close(err error) {
 
 func (s *session) SetCapacity(bytes uint) { s.capacity = bytes }
 
-func (s *session) Sender(setting ...LinkSetting) (snd Sender, err error) {
+func (s *session) Sender(setting ...LinkOption) (snd Sender, err error) {
 	err = s.engine().InjectWait(func() error {
 		l, err := localLink(s, true, setting...)
 		if err == nil {
@@ -87,7 +83,7 @@ func (s *session) Sender(setting ...LinkSetting) (snd Sender, err error) {
 	return
 }
 
-func (s *session) Receiver(setting ...LinkSetting) (rcv Receiver, err error) {
+func (s *session) Receiver(setting ...LinkOption) (rcv Receiver, err error) {
 	err = s.engine().InjectWait(func() error {
 		l, err := localLink(s, false, setting...)
 		if err == nil {

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/electron/time.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/electron/time.go b/proton-c/bindings/go/src/qpid.apache.org/electron/time.go
index 4ad6a89..0015185 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/electron/time.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/electron/time.go
@@ -20,7 +20,7 @@ under the License.
 package electron
 
 import (
-	"qpid.apache.org/internal"
+	"fmt"
 	"reflect"
 	"time"
 )
@@ -38,7 +38,7 @@ import (
 // If timeout == Forever the function will return only when there is a result or
 // some non-timeout error occurs.
 //
-var Timeout = internal.Errorf("timeout")
+var Timeout = fmt.Errorf("timeout")
 
 // Forever can be used as a timeout parameter to indicate wait forever.
 const Forever time.Duration = -1

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/internal/error.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/internal/error.go b/proton-c/bindings/go/src/qpid.apache.org/internal/error.go
deleted file mode 100644
index 1b108e6..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/internal/error.go
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-// Internal implementation details - ignore.
-package internal
-
-// #cgo LDFLAGS: -lqpid-proton
-// #include <proton/error.h>
-// #include <proton/codec.h>
-import "C"
-
-import (
-	"fmt"
-	"sync"
-	"sync/atomic"
-	"unsafe"
-)
-
-// Error type for proton runtime errors returned as error values.
-type Error string
-
-// Error prefixes error message with proton:
-func (e Error) Error() string {
-	return "proton: " + string(e)
-}
-
-// Errorf creates an Error with a formatted message
-func Errorf(format string, a ...interface{}) Error {
-	return Error(fmt.Sprintf(format, a...))
-}
-
-type PnErrorCode int
-
-func (e PnErrorCode) String() string {
-	switch e {
-	case C.PN_EOS:
-		return "end-of-data"
-	case C.PN_ERR:
-		return "error"
-	case C.PN_OVERFLOW:
-		return "overflow"
-	case C.PN_UNDERFLOW:
-		return "underflow"
-	case C.PN_STATE_ERR:
-		return "bad-state"
-	case C.PN_ARG_ERR:
-		return "invalid-argument"
-	case C.PN_TIMEOUT:
-		return "timeout"
-	case C.PN_INTR:
-		return "interrupted"
-	case C.PN_INPROGRESS:
-		return "in-progress"
-	default:
-		return fmt.Sprintf("unknown-error(%d)", e)
-	}
-}
-
-func PnError(p unsafe.Pointer) error {
-	e := (*C.pn_error_t)(p)
-	if e == nil || C.pn_error_code(e) == 0 {
-		return nil
-	}
-	return Errorf("%s: %s", PnErrorCode(C.pn_error_code(e)), C.GoString(C.pn_error_text(e)))
-}
-
-// panicIf panics if condition is true, the panic value is Errorf(fmt, args...)
-func panicIf(condition bool, fmt string, args ...interface{}) {
-	if condition {
-		panic(Errorf(fmt, args...))
-	}
-}
-
-// ErrorHolder is a goroutine-safe error holder that keeps the first error that is set.
-type ErrorHolder struct {
-	once  sync.Once
-	value atomic.Value
-}
-
-// Set the error if not already set, return the error in the Holder.
-func (e *ErrorHolder) Set(err error) {
-	if err != nil {
-		e.once.Do(func() { e.value.Store(err) })
-	}
-}
-
-// Get the error.
-func (e *ErrorHolder) Get() (err error) {
-	err, _ = e.value.Load().(error)
-	return
-}
-
-// Assert panics if condition is false with optional formatted message
-func Assert(condition bool, format ...interface{}) {
-	if !condition {
-		if len(format) > 0 {
-			panic(Errorf(format[0].(string), format[1:]...))
-		} else {
-			panic(Errorf("assertion failed"))
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/internal/flexchannel.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/internal/flexchannel.go b/proton-c/bindings/go/src/qpid.apache.org/internal/flexchannel.go
deleted file mode 100644
index 77b524c..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/internal/flexchannel.go
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package internal
-
-// FlexChannel acts like a channel with an automatically sized buffer, see NewFlexChannel().
-type FlexChannel struct {
-	// In channel to send to. close(In) will close the FlexChannel once buffer has drained.
-	In chan<- interface{}
-	// Out channel to receive from. Out closes when In has closed and the buffer is empty.
-	Out <-chan interface{}
-
-	in, out chan interface{}
-	buffer  []interface{}
-	limit   int
-}
-
-// NewFlexChannel creates a FlexChannel, a channel with an automatically-sized buffer.
-//
-// Initially the buffer size is 0, the buffer grows as needed up to limit. limit < 0 means
-// there is no limit.
-//
-func NewFlexChannel(limit int) *FlexChannel {
-	fc := &FlexChannel{
-		in:     make(chan interface{}),
-		out:    make(chan interface{}),
-		buffer: make([]interface{}, 0),
-		limit:  limit,
-	}
-	fc.In = fc.in
-	fc.Out = fc.out
-	go fc.run()
-	return fc
-}
-
-func (fc *FlexChannel) run() {
-	defer func() { // Flush the channel on exit
-		for _, data := range fc.buffer {
-			fc.out <- data
-		}
-		close(fc.out)
-	}()
-
-	for {
-		var usein, useout chan interface{}
-		var outvalue interface{}
-		if len(fc.buffer) > 0 {
-			useout = fc.out
-			outvalue = fc.buffer[0]
-		}
-		if len(fc.buffer) < fc.limit || fc.limit < 0 {
-			usein = fc.in
-		}
-		Assert(usein != nil || useout != nil)
-		select {
-		case useout <- outvalue:
-			fc.buffer = fc.buffer[1:]
-		case data, ok := <-usein:
-			if ok {
-				fc.buffer = append(fc.buffer, data)
-			} else {
-				return
-			}
-		}
-	}
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/internal/flexchannel_test.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/internal/flexchannel_test.go b/proton-c/bindings/go/src/qpid.apache.org/internal/flexchannel_test.go
deleted file mode 100644
index d0e1a44..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/internal/flexchannel_test.go
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package internal
-
-import (
-	"testing"
-)
-
-func recvall(ch <-chan interface{}) (result []interface{}) {
-	for {
-		select {
-		case x := <-ch:
-			result = append(result, x)
-		default:
-			return
-		}
-	}
-}
-
-func sendall(data []interface{}, ch chan<- interface{}) {
-}
-
-func TestFlex(t *testing.T) {
-	fc := NewFlexChannel(5)
-
-	// Test send/receve
-	go func() {
-		for i := 0; i < 4; i++ {
-			fc.In <- i
-		}
-	}()
-
-	for i := 0; i < 4; i++ {
-		j := <-fc.Out
-		if i != j {
-			t.Error("%v != %v", i, j)
-		}
-	}
-	select {
-	case x, ok := <-fc.Out:
-		t.Error("receive empty channel got", x, ok)
-	default:
-	}
-
-	// Test buffer limit
-	for i := 10; i < 15; i++ {
-		fc.In <- i
-	}
-	select {
-	case fc.In <- 0:
-		t.Error("send to full channel did not block")
-	default:
-	}
-	i := <-fc.Out
-	if i != 10 {
-		t.Error("%v != %v", i, 10)
-	}
-	fc.In <- 15
-	close(fc.In)
-
-	for i := 11; i < 16; i++ {
-		j := <-fc.Out
-		if i != j {
-			t.Error("%v != %v", i, j)
-		}
-	}
-
-	x, ok := <-fc.Out
-	if ok {
-		t.Error("Unexpected value on Out", x)
-	}
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/internal/safemap.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/internal/safemap.go b/proton-c/bindings/go/src/qpid.apache.org/internal/safemap.go
deleted file mode 100644
index 3a1fe2b..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/internal/safemap.go
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package internal
-
-import (
-	"sync"
-)
-
-// SafeMap is a goroutine-safe map of interface{} to interface{}.
-type SafeMap struct {
-	m    map[interface{}]interface{}
-	lock sync.Mutex
-}
-
-func MakeSafeMap() SafeMap { return SafeMap{m: make(map[interface{}]interface{})} }
-
-func (m *SafeMap) Get(key interface{}) interface{} {
-	m.lock.Lock()
-	defer m.lock.Unlock()
-	return m.m[key]
-}
-
-func (m *SafeMap) GetOk(key interface{}) (interface{}, bool) {
-	m.lock.Lock()
-	defer m.lock.Unlock()
-	v, ok := m.m[key]
-	return v, ok
-}
-
-func (m *SafeMap) Put(key, value interface{}) {
-	m.lock.Lock()
-	defer m.lock.Unlock()
-	m.m[key] = value
-}
-
-func (m *SafeMap) Delete(key interface{}) {
-	m.lock.Lock()
-	defer m.lock.Unlock()
-	delete(m.m, key)
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/internal/uuid.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/internal/uuid.go b/proton-c/bindings/go/src/qpid.apache.org/internal/uuid.go
deleted file mode 100644
index ef941a1..0000000
--- a/proton-c/bindings/go/src/qpid.apache.org/internal/uuid.go
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
-*/
-
-package internal
-
-import (
-	"fmt"
-	"math/rand"
-	"strconv"
-	"sync"
-	"sync/atomic"
-	"time"
-)
-
-type UUID [16]byte
-
-func (u UUID) String() string {
-	return fmt.Sprintf("%X-%X-%X-%X-%X", u[0:4], u[4:6], u[6:8], u[8:10], u[10:])
-}
-
-// Don't mess with the default random source.
-var randomSource = rand.NewSource(time.Now().UnixNano())
-var randomLock sync.Mutex
-
-func random() byte {
-	randomLock.Lock()
-	defer randomLock.Unlock()
-	return byte(randomSource.Int63())
-}
-
-func UUID4() UUID {
-	var u UUID
-	for i := 0; i < len(u); i++ {
-		u[i] = random()
-	}
-	// See /https://tools.ietf.org/html/rfc4122#section-4.4
-	u[6] = (u[6] & 0x0F) | 0x40 // Version bits to 4
-	u[8] = (u[8] & 0x3F) | 0x80 // Reserved bits (top two) set to 01
-	return u
-}
-
-// A simple atomic counter to generate unique 64 bit IDs.
-type IdCounter struct{ count uint64 }
-
-// NextInt gets the next uint64 value from the atomic counter.
-func (uc *IdCounter) NextInt() uint64 {
-	return atomic.AddUint64(&uc.count, 1)
-}
-
-// Next gets the next integer value encoded as a base32 string, safe for NUL
-// terminated C strings.
-func (uc *IdCounter) Next() string {
-	return strconv.FormatUint(uc.NextInt(), 32)
-}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go b/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go
index 2cebb49..95d70e9 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/engine.go
@@ -34,7 +34,6 @@ import (
 	"fmt"
 	"io"
 	"net"
-	"qpid.apache.org/internal"
 	"sync"
 	"unsafe"
 )
@@ -113,7 +112,7 @@ func (b *bufferChan) buffer() []byte {
 //
 type Engine struct {
 	// Error is set on exit from Run() if there was an error.
-	err    internal.ErrorHolder
+	err    ErrorHolder
 	inject chan func()
 
 	conn       net.Conn
@@ -129,9 +128,6 @@ type Engine struct {
 
 const bufferSize = 4096
 
-// Map of Connection to *Engine
-var engines = internal.MakeSafeMap()
-
 // NewEngine initializes a engine with a connection and handlers. To start it running:
 //    eng := NewEngine(...)
 //    go run eng.Run()
@@ -152,7 +148,7 @@ func NewEngine(conn net.Conn, handlers ...EventHandler) (*Engine, error) {
 		running:    make(chan struct{}),
 	}
 	if eng.transport.IsNil() || eng.connection.IsNil() || eng.collector == nil {
-		return nil, internal.Errorf("failed to allocate engine")
+		return nil, fmt.Errorf("failed to allocate engine")
 	}
 
 	// TODO aconway 2015-06-25: connection settings for user, password, container etc.
@@ -160,14 +156,13 @@ func NewEngine(conn net.Conn, handlers ...EventHandler) (*Engine, error) {
 	// to run connection.
 
 	// Unique container-id by default.
-	eng.connection.SetContainer(internal.UUID4().String())
+	eng.connection.SetContainer(UUID4().String())
 	pnErr := eng.transport.Bind(eng.connection)
 	if pnErr != 0 {
-		return nil, internal.Errorf("cannot setup engine: %s", internal.PnErrorCode(pnErr))
+		return nil, fmt.Errorf("cannot setup engine: %s", PnErrorCode(pnErr))
 	}
 	C.pn_connection_collect(eng.connection.pn, eng.collector)
 	eng.connection.Open()
-	connectionContexts.Put(eng.connection, connectionContext{eng.String()})
 	return eng, nil
 }
 
@@ -320,7 +315,6 @@ func (eng *Engine) Run() error {
 	wait.Wait()
 	close(eng.running) // Signal goroutines have exited and Error is set.
 
-	connectionContexts.Delete(eng.connection)
 	if !eng.connection.IsNil() {
 		eng.connection.Free()
 	}
@@ -360,7 +354,7 @@ func (eng *Engine) pop(buf *[]byte) {
 		*buf = (*buf)[:]
 		return
 	case pending < 0:
-		panic(internal.Errorf("%s", internal.PnErrorCode(pending)))
+		panic(fmt.Errorf("%s", PnErrorCode(pending)))
 	}
 	size := minInt(pending, cap(*buf))
 	*buf = (*buf)[:size]
@@ -368,7 +362,7 @@ func (eng *Engine) pop(buf *[]byte) {
 		return
 	}
 	C.memcpy(unsafe.Pointer(&(*buf)[0]), eng.transport.Head(), C.size_t(size))
-	internal.Assert(size > 0)
+	assert(size > 0)
 	eng.transport.Pop(uint(size))
 }
 
@@ -377,7 +371,7 @@ func (eng *Engine) push(buf []byte) {
 	for len(buf2) > 0 {
 		n := eng.transport.Push(buf2)
 		if n <= 0 {
-			panic(internal.Errorf("error in transport: %s", internal.PnErrorCode(n)))
+			panic(fmt.Errorf("error in transport: %s", PnErrorCode(n)))
 		}
 		buf2 = buf2[n:]
 	}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/proton/error.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/error.go b/proton-c/bindings/go/src/qpid.apache.org/proton/error.go
new file mode 100644
index 0000000..80d9680
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/error.go
@@ -0,0 +1,96 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+// Internal implementation details - ignore.
+package proton
+
+// #cgo LDFLAGS: -lqpid-proton
+// #include <proton/error.h>
+// #include <proton/codec.h>
+import "C"
+
+import (
+	"fmt"
+	"sync"
+	"sync/atomic"
+)
+
+type PnErrorCode int
+
+func (e PnErrorCode) String() string {
+	switch e {
+	case C.PN_EOS:
+		return "end-of-data"
+	case C.PN_ERR:
+		return "error"
+	case C.PN_OVERFLOW:
+		return "overflow"
+	case C.PN_UNDERFLOW:
+		return "underflow"
+	case C.PN_STATE_ERR:
+		return "bad-state"
+	case C.PN_ARG_ERR:
+		return "invalid-argument"
+	case C.PN_TIMEOUT:
+		return "timeout"
+	case C.PN_INTR:
+		return "interrupted"
+	case C.PN_INPROGRESS:
+		return "in-progress"
+	default:
+		return fmt.Sprintf("unknown-error(%d)", e)
+	}
+}
+
+func PnError(e *C.pn_error_t) error {
+	if e == nil || C.pn_error_code(e) == 0 {
+		return nil
+	}
+	return fmt.Errorf("%s: %s", PnErrorCode(C.pn_error_code(e)), C.GoString(C.pn_error_text(e)))
+}
+
+// ErrorHolder is a goroutine-safe error holder that keeps the first error that is set.
+type ErrorHolder struct {
+	once  sync.Once
+	value atomic.Value
+}
+
+// Set the error if not already set, return the error in the Holder.
+func (e *ErrorHolder) Set(err error) {
+	if err != nil {
+		e.once.Do(func() { e.value.Store(err) })
+	}
+}
+
+// Get the error.
+func (e *ErrorHolder) Get() (err error) {
+	err, _ = e.value.Load().(error)
+	return
+}
+
+// assert panics if condition is false with optional formatted message
+func assert(condition bool, format ...interface{}) {
+	if !condition {
+		if len(format) > 0 {
+			panic(fmt.Errorf(format[0].(string), format[1:]...))
+		} else {
+			panic(fmt.Errorf("assertion failed"))
+		}
+	}
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/proton/handlers.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/handlers.go b/proton-c/bindings/go/src/qpid.apache.org/proton/handlers.go
index 53b744c..87c43ae 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/handlers.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/handlers.go
@@ -21,10 +21,7 @@ package proton
 
 // #include <proton/handlers.h>
 import "C"
-
-import (
-	"qpid.apache.org/internal"
-)
+import "fmt"
 
 // EventHandler handles core proton events.
 type EventHandler interface {
@@ -236,7 +233,7 @@ func (d endpointDelegator) HandleEvent(e Event) {
 
 	default:
 		// We shouldn't be called with any other event type.
-		panic(internal.Errorf("internal error, not an open/close event: %s", e))
+		panic(fmt.Errorf("internal error, not an open/close event: %s", e))
 	}
 }
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/proton/message.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/message.go b/proton-c/bindings/go/src/qpid.apache.org/proton/message.go
index c545b7e..2336483 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/message.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/message.go
@@ -25,8 +25,10 @@ package proton
 import "C"
 
 import (
-	"qpid.apache.org/internal"
+	"fmt"
 	"qpid.apache.org/amqp"
+	"strconv"
+	"sync/atomic"
 )
 
 // HasMessage is true if all message data is available.
@@ -41,42 +43,47 @@ func (d Delivery) HasMessage() bool { return !d.IsNil() && d.Readable() && !d.Pa
 // Will return an error if message is incomplete or not current.
 func (delivery Delivery) Message() (m amqp.Message, err error) {
 	if !delivery.Readable() {
-		return nil, internal.Errorf("delivery is not readable")
+		return nil, fmt.Errorf("delivery is not readable")
 	}
 	if delivery.Partial() {
-		return nil, internal.Errorf("delivery has partial message")
+		return nil, fmt.Errorf("delivery has partial message")
 	}
 	data := make([]byte, delivery.Pending())
 	result := delivery.Link().Recv(data)
 	if result != len(data) {
-		return nil, internal.Errorf("cannot receive message: %s", internal.PnErrorCode(result))
+		return nil, fmt.Errorf("cannot receive message: %s", PnErrorCode(result))
 	}
 	m = amqp.NewMessage()
 	err = m.Decode(data)
 	return
 }
 
-// TODO aconway 2015-04-08: proper handling of delivery tags. Tag counter per link.
-var tags internal.IdCounter
+// Process-wide atomic counter for generating tag names
+var tagCounter uint64
+
+func nextTag() string {
+	return strconv.FormatUint(atomic.AddUint64(&tagCounter, 1), 32)
+}
 
 // Send sends a amqp.Message over a Link.
 // Returns a Delivery that can be use to determine the outcome of the message.
 func (link Link) Send(m amqp.Message) (Delivery, error) {
 	if !link.IsSender() {
-		return Delivery{}, internal.Errorf("attempt to send message on receiving link")
+		return Delivery{}, fmt.Errorf("attempt to send message on receiving link")
 	}
-	delivery := link.Delivery(tags.Next())
+
+	delivery := link.Delivery(nextTag())
 	bytes, err := m.Encode(nil)
 	if err != nil {
-		return Delivery{}, internal.Errorf("cannot send mesage %s", err)
+		return Delivery{}, fmt.Errorf("cannot send mesage %s", err)
 	}
 	result := link.SendBytes(bytes)
 	link.Advance()
 	if result != len(bytes) {
 		if result < 0 {
-			return delivery, internal.Errorf("send failed %v", internal.PnErrorCode(result))
+			return delivery, fmt.Errorf("send failed %v", PnErrorCode(result))
 		} else {
-			return delivery, internal.Errorf("send incomplete %v of %v", result, len(bytes))
+			return delivery, fmt.Errorf("send incomplete %v of %v", result, len(bytes))
 		}
 	}
 	if link.RemoteSndSettleMode() == SndSettled {

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/proton/uuid.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/uuid.go b/proton-c/bindings/go/src/qpid.apache.org/proton/uuid.go
new file mode 100644
index 0000000..f2dc70e
--- /dev/null
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/uuid.go
@@ -0,0 +1,57 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+package proton
+
+import (
+	"fmt"
+	"math/rand"
+	"sync"
+	"time"
+)
+
+// UUID is a 16-byte Universally Unique Identifier
+type UUID [16]byte
+
+// String gives a UUID in standard string format.
+func (u UUID) String() string {
+	return fmt.Sprintf("%X-%X-%X-%X-%X", u[0:4], u[4:6], u[6:8], u[8:10], u[10:])
+}
+
+// Don't mess with the default random source.
+var randomSource = rand.NewSource(time.Now().UnixNano())
+var randomLock sync.Mutex
+
+func random() byte {
+	randomLock.Lock()
+	defer randomLock.Unlock()
+	return byte(randomSource.Int63())
+}
+
+// UUID4 returns a randomly-generated (version 4) UUID, as per RFC4122
+func UUID4() UUID {
+	var u UUID
+	for i := 0; i < len(u); i++ {
+		u[i] = random()
+	}
+	// See /https://tools.ietf.org/html/rfc4122#section-4.4
+	u[6] = (u[6] & 0x0F) | 0x40 // Version bits to 4
+	u[8] = (u[8] & 0x3F) | 0x80 // Reserved bits (top two) set to 01
+	return u
+}

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers.go b/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers.go
index 93bc96d..1a1fd96 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers.go
@@ -37,7 +37,6 @@ import "C"
 import (
 	"fmt"
 	"qpid.apache.org/amqp"
-	"qpid.apache.org/internal"
 	"reflect"
 	"time"
 	"unsafe"
@@ -125,9 +124,7 @@ func (d Data) Free()                   { C.pn_data_free(d.pn) }
 func (d Data) Pointer() unsafe.Pointer { return unsafe.Pointer(d.pn) }
 func (d Data) Clear()                  { C.pn_data_clear(d.pn) }
 func (d Data) Rewind()                 { C.pn_data_rewind(d.pn) }
-func (d Data) Error() error {
-	return internal.PnError(unsafe.Pointer(C.pn_data_error(d.pn)))
-}
+func (d Data) Error() error            { return PnError(C.pn_data_error(d.pn)) }
 
 // State holds the state flags for an AMQP endpoint.
 type State byte
@@ -283,18 +280,8 @@ func (s Session) Receiver(name string) Link {
 	return Link{C.pn_receiver(s.pn, cname)}
 }
 
-// Context information per connection.
-type connectionContext struct {
-	str string
-}
-
-var connectionContexts = internal.MakeSafeMap()
-
 // Unique (per process) string identifier for a connection, useful for debugging.
 func (c Connection) String() string {
-	if cc, ok := connectionContexts.Get(c).(connectionContext); ok {
-		return cc.str
-	}
 	return fmt.Sprintf("%x", c.pn)
 }
 

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e073fad0/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers_gen.go
----------------------------------------------------------------------
diff --git a/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers_gen.go b/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers_gen.go
index 074495d..c69b2a8 100644
--- a/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers_gen.go
+++ b/proton-c/bindings/go/src/qpid.apache.org/proton/wrappers_gen.go
@@ -25,7 +25,6 @@ under the License.
 package proton
 
 import (
-	"qpid.apache.org/internal"
 	"time"
 	"unsafe"
 )
@@ -158,7 +157,7 @@ func (s Session) State() State {
 	return State(C.pn_session_state(s.pn))
 }
 func (s Session) Error() error {
-	return internal.PnError(unsafe.Pointer(C.pn_session_error(s.pn)))
+	return PnError(C.pn_session_error(s.pn))
 }
 func (s Session) Condition() Condition {
 	return Condition{C.pn_session_condition(s.pn)}
@@ -258,7 +257,7 @@ func (l Link) State() State {
 	return State(C.pn_link_state(l.pn))
 }
 func (l Link) Error() error {
-	return internal.PnError(unsafe.Pointer(C.pn_link_error(l.pn)))
+	return PnError(C.pn_link_error(l.pn))
 }
 func (l Link) Condition() Condition {
 	return Condition{C.pn_link_condition(l.pn)}
@@ -668,7 +667,7 @@ func (c Connection) Release() {
 	C.pn_connection_release(c.pn)
 }
 func (c Connection) Error() error {
-	return internal.PnError(unsafe.Pointer(C.pn_connection_error(c.pn)))
+	return PnError(C.pn_connection_error(c.pn))
 }
 func (c Connection) State() State {
 	return State(C.pn_connection_state(c.pn))
@@ -780,7 +779,7 @@ func (t Transport) Condition() Condition {
 	return Condition{C.pn_transport_condition(t.pn)}
 }
 func (t Transport) Error() error {
-	return internal.PnError(unsafe.Pointer(C.pn_transport_error(t.pn)))
+	return PnError(C.pn_transport_error(t.pn))
 }
 func (t Transport) Bind(connection Connection) int {
 	return int(C.pn_transport_bind(t.pn, connection.pn))


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message