You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rk...@apache.org on 2019/10/30 00:40:08 UTC

[qpid-proton] 01/02: PROTON-2105: Added support for go modules.

This is an automated email from the ASF dual-hosted git repository.

rkieley pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git

commit 7dc59589a806bc902836d86f43105aff4c8556a3
Author: Roddie Kieley <rk...@unifiedsoftworx.com>
AuthorDate: Mon Sep 30 22:36:53 2019 -0230

    PROTON-2105: Added support for go modules.
---
 cpp/docs/io.md                                         |  2 +-
 docs/developers.md                                     |  2 +-
 go.mod                                                 |  3 +++
 go/CMakeLists.txt                                      | 18 ++++++++++--------
 go/examples/README.md                                  | 16 ++++++++--------
 go/examples/electron/broker.go                         |  4 ++--
 go/examples/electron/receive.go                        |  4 ++--
 go/examples/electron/selected_recv.go                  |  4 ++--
 go/examples/electron/send.go                           |  4 ++--
 go/examples/proton/broker.go                           |  4 ++--
 go/genwrap.go                                          |  6 +++---
 go/{src/qpid.apache.org => pkg}/README.md              | 12 ++++++------
 go/{src/qpid.apache.org => pkg}/amqp/doc.go            |  0
 go/{src/qpid.apache.org => pkg}/amqp/error.go          |  0
 go/{src/qpid.apache.org => pkg}/amqp/interop_test.go   |  2 +-
 go/{src/qpid.apache.org => pkg}/amqp/marshal.go        |  0
 go/{src/qpid.apache.org => pkg}/amqp/marshal_test.go   |  2 +-
 go/{src/qpid.apache.org => pkg}/amqp/message.go        |  0
 go/{src/qpid.apache.org => pkg}/amqp/message_test.go   |  2 +-
 go/{src/qpid.apache.org => pkg}/amqp/types.go          |  0
 go/{src/qpid.apache.org => pkg}/amqp/types_test.go     |  2 +-
 go/{src/qpid.apache.org => pkg}/amqp/unmarshal.go      |  0
 go/{src/qpid.apache.org => pkg}/amqp/url.go            |  0
 go/{src/qpid.apache.org => pkg}/amqp/url_test.go       |  0
 go/{src/qpid.apache.org => pkg}/amqp/version.go        |  0
 go/{src/qpid.apache.org => pkg}/electron/auth_test.go  |  2 +-
 .../qpid.apache.org => pkg}/electron/benchmark_test.go |  4 ++--
 .../qpid.apache.org => pkg}/electron/common_test.go    |  2 +-
 go/{src/qpid.apache.org => pkg}/electron/connection.go |  4 ++--
 go/{src/qpid.apache.org => pkg}/electron/container.go  |  2 +-
 go/{src/qpid.apache.org => pkg}/electron/doc.go        |  2 +-
 .../qpid.apache.org => pkg}/electron/electron_test.go  |  4 ++--
 go/{src/qpid.apache.org => pkg}/electron/endpoint.go   |  2 +-
 .../electron/example_client_server_test.go             |  4 ++--
 go/{src/qpid.apache.org => pkg}/electron/handler.go    |  4 ++--
 go/{src/qpid.apache.org => pkg}/electron/link.go       |  4 ++--
 go/{src/qpid.apache.org => pkg}/electron/link_test.go  |  6 +++---
 go/{src/qpid.apache.org => pkg}/electron/receiver.go   |  4 ++--
 go/{src/qpid.apache.org => pkg}/electron/sender.go     |  4 ++--
 go/{src/qpid.apache.org => pkg}/electron/session.go    |  2 +-
 go/{src/qpid.apache.org => pkg}/electron/time.go       |  0
 go/{src/qpid.apache.org => pkg}/internal/test/test.go  |  0
 go/{src/qpid.apache.org => pkg}/proton/doc.go          |  0
 go/{src/qpid.apache.org => pkg}/proton/engine.go       |  0
 go/{src/qpid.apache.org => pkg}/proton/error.go        |  0
 go/{src/qpid.apache.org => pkg}/proton/handlers.go     |  0
 go/{src/qpid.apache.org => pkg}/proton/message.go      |  2 +-
 go/{src/qpid.apache.org => pkg}/proton/proton_test.go  |  2 +-
 go/{src/qpid.apache.org => pkg}/proton/uuid.go         |  0
 go/{src/qpid.apache.org => pkg}/proton/wrappers.go     |  2 +-
 go/{src/qpid.apache.org => pkg}/proton/wrappers_gen.go |  0
 go/{src/qpid.apache.org => pkg}/readme-go-get.md       |  0
 52 files changed, 74 insertions(+), 69 deletions(-)

diff --git a/cpp/docs/io.md b/cpp/docs/io.md
index 2bda1cf..0c282d9 100644
--- a/cpp/docs/io.md
+++ b/cpp/docs/io.md
@@ -18,5 +18,5 @@ concurrently in a multithreaded framework. The driver is written in
 portable C++98-compatible code.
 
 For examples of use, see
-[the proton source code](qpid.apache.org/proton), in particular the
+[the proton source code](https://qpid.apache.org/proton), in particular the
 C++ `proton::container`.
diff --git a/docs/developers.md b/docs/developers.md
index 65eee2c..f193670 100644
--- a/docs/developers.md
+++ b/docs/developers.md
@@ -90,7 +90,7 @@ Mailing list
 
 Subscribe to the Qpid mailing lists using details at:
 
-  http://qpid.apache.org/discussion.html
+  https://qpid.apache.org/discussion.html
 
 
 Patches
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..f9c1bbf
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,3 @@
+module github.com/apache/qpid-proton
+
+go 1.12
diff --git a/go/CMakeLists.txt b/go/CMakeLists.txt
index 5887635..377c514 100644
--- a/go/CMakeLists.txt
+++ b/go/CMakeLists.txt
@@ -42,10 +42,12 @@ endif()
 separate_arguments(GO_BUILD_FLAGS)
 separate_arguments(GO_TEST_FLAGS)
 
-# Create a Go tree in the binary directory, link src to the source directory
+# Create a Go tree in the binary directory, link pkg to the source directory, link go.mod file
 set(GOPATH ${CMAKE_CURRENT_BINARY_DIR})
-add_custom_target(go-src-link ALL
-  COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/src ${GOPATH}/src)
+add_custom_target(go-pkg-link ALL
+  COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/pkg ${GOPATH}/pkg)
+add_custom_target(go-mod-link ALL
+        COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_CURRENT_SOURCE_DIR}/../go.mod ${GOPATH}/../go.mod)
 
 # Following are CACHE INTERNAL so examples/CMakeLists.txt can see them.
 set(GO_ENV ${PN_ENV_SCRIPT} --
@@ -66,12 +68,12 @@ set(GO_TEST ${GO} test ${GO_BUILD_FLAGS} ${GO_RPATH_FLAGS} ${GO_TEST_FLAGS} CACH
 # CMake so just run them every time, they do nothing if nothing needs to be
 # done.
 add_custom_target(go-build ALL
-  COMMAND ${GO_INSTALL} qpid.apache.org/...
-  DEPENDS qpid-proton-core
+  COMMAND ${GO_INSTALL} $ENV{PWD}/go/pkg/...
+  DEPENDS qpid-proton-core go-pkg-link go-mod-link
   WORKING_DIRECTORY $ENV{PWD})
 
 add_test(
-  NAME go-test COMMAND ${GO_TEST} qpid.apache.org/...
+  NAME go-test COMMAND ${GO_TEST} $ENV{PWD}/go/pkg/...
   WORKING_DIRECTORY $ENV{PWD})
 
 # Clean up go output directories.
@@ -80,10 +82,10 @@ list(APPEND ADDITIONAL_MAKE_CLEAN_FILES ${GOPATH}/pkg ${GOPATH}/bin)
 add_subdirectory(examples)
 
 # Install go sources.
-set (GO_INSTALL_DIR ${SHARE_INSTALL_DIR}/gocode/src CACHE PATH "Installation directory for Go code")
+set (GO_INSTALL_DIR ${SHARE_INSTALL_DIR}/gocode/pkg CACHE PATH "Installation directory for Go code")
 mark_as_advanced (GO_INSTALL_DIR)
 
-install(DIRECTORY src/qpid.apache.org DESTINATION ${GO_INSTALL_DIR} COMPONENT Go)
+install(DIRECTORY pkg DESTINATION ${GO_INSTALL_DIR} COMPONENT Go)
 install(DIRECTORY examples/
   DESTINATION "${PROTON_SHARE}/examples/go"
   COMPONENT Go
diff --git a/go/examples/README.md b/go/examples/README.md
index 07f9eed..8bb8912 100644
--- a/go/examples/README.md
+++ b/go/examples/README.md
@@ -2,7 +2,7 @@
 
 ## Electron examples
 
-[qpid.apache.org/electron](http://godoc.org/qpid.apache.org/electron) is a
+[electron](http://godoc.org/github.com/apache/qpid-proton/go/pkg/electron) is a
 simple API for writing concurrent AMQP clients and servers.
 
 - [receive.go](electron/receive.go) receive from many connections concurrently.
@@ -11,9 +11,9 @@ simple API for writing concurrent AMQP clients and servers.
 
 ## Proton examples
 
-[qpid.apache.org/proton](http://godoc.org/qpid.apache.org/proton) is an
+[proton](http://godoc.org/github.com/apache/qpid-proton/go/pkg/proton) is an
 event-driven, concurrent-unsafe Go wrapper for the proton-C library. The
-[electron](http://godoc.org/qpid.apache.org/electron) package provides a more
+[electron](http://godoc.org/github.com/apache/qpid-proton/go/pkg/electron) package provides a more
 Go-friendly concurrent API built on top of proton.
 
 - [broker.go](proton/broker.go) a simple broker using the proton API
@@ -25,14 +25,14 @@ See [A Tale of Two Brokers](#a-tale-of-two-brokers) for a comparison of the two
 If you have the proton-C library and headers installed you can get the latest go
 packages with
 
-    go get qpid.apache.org/electron
+    go get github.com/apache/qpid-proton/go/pkg/electron
 
 If Proton-C is installed in a non-standard place (other than /usr or /usr/local)
 you should set these environment variables before `go get`:
 
     export CGO_LDFLAGS="-L/<my-proton>/lib[64]"
     export CGO_CFLAGS="-I/<my-proton>/include"
-    go get qpid.apache.org/electron
+    go get github.com/apache/qpid-proton
 
 If you have a proton build you don't need to `go get`, you can set your GOPATH
 to use the binding from the checkout with:
@@ -91,10 +91,10 @@ Or use the Go broker and the python clients:
 
 ## A tale of two brokers.
 
-The [proton](http://godoc.org/qpid.apache.org/proton) and
-[electron](http://godoc.org/qpid.apache.org/electron) packages provide two
+The [proton](http://godoc.org/github.com/apache/qpid-proton/go/pkg/proton) and
+[electron](http://godoc.org/github.com/apache/qpid-proton/go/pkg/electron) packages provide two
 different APIs for building AMQP applications. For most applications,
-[electron](http://godoc.org/qpid.apache.org/electron) is easier to use.
+[electron](http://godoc.org/github.com/apache/qpid-proton/go/pkg/electron) is easier to use.
 
 The examples [proton/broker.go](proton/broker.go) and
 [electron/broker.go](electron/broker.go) implement the same simple broker
diff --git a/go/examples/electron/broker.go b/go/examples/electron/broker.go
index 6df4e16..c51208e 100644
--- a/go/examples/electron/broker.go
+++ b/go/examples/electron/broker.go
@@ -32,8 +32,8 @@ import (
 	"log"
 	"net"
 	"os"
-	"qpid.apache.org/amqp"
-	"qpid.apache.org/electron"
+	"github.com/apache/qpid-proton/go/pkg/amqp"
+	"github.com/apache/qpid-proton/go/pkg/electron"
 	"sync"
 )
 
diff --git a/go/examples/electron/receive.go b/go/examples/electron/receive.go
index 774e589..99a1cdf 100644
--- a/go/examples/electron/receive.go
+++ b/go/examples/electron/receive.go
@@ -27,8 +27,8 @@ import (
 	"strings"
 	"sync"
 
-	"qpid.apache.org/amqp"
-	"qpid.apache.org/electron"
+	"github.com/apache/qpid-proton/go/pkg/amqp"
+	"github.com/apache/qpid-proton/go/pkg/electron"
 )
 
 // Usage and command-line flags
diff --git a/go/examples/electron/selected_recv.go b/go/examples/electron/selected_recv.go
index b1c6e6f..eee853d 100644
--- a/go/examples/electron/selected_recv.go
+++ b/go/examples/electron/selected_recv.go
@@ -26,8 +26,8 @@ import (
 	"os"
 	"strings"
 
-	"qpid.apache.org/amqp"
-	"qpid.apache.org/electron"
+	"github.com/apache/qpid-proton/go/pkg/amqp"
+	"github.com/apache/qpid-proton/go/pkg/electron"
 )
 
 // NOTE: this example requires a broker thta supports the APACHE.ORG:SELECTOR filter.
diff --git a/go/examples/electron/send.go b/go/examples/electron/send.go
index 7e7481d..dee8eb8 100644
--- a/go/examples/electron/send.go
+++ b/go/examples/electron/send.go
@@ -24,8 +24,8 @@ import (
 	"fmt"
 	"log"
 	"os"
-	"qpid.apache.org/amqp"
-	"qpid.apache.org/electron"
+	"github.com/apache/qpid-proton/go/pkg/amqp"
+	"github.com/apache/qpid-proton/go/pkg/electron"
 	"strings"
 	"sync"
 )
diff --git a/go/examples/proton/broker.go b/go/examples/proton/broker.go
index 8a243e8..7e2c865 100644
--- a/go/examples/proton/broker.go
+++ b/go/examples/proton/broker.go
@@ -35,8 +35,8 @@ import (
 	"log"
 	"net"
 	"os"
-	"qpid.apache.org/amqp"
-	"qpid.apache.org/proton"
+	"github.com/apache/qpid-proton/go/pkg/amqp"
+	"github.com/apache/qpid-proton/go/pkg/proton"
 	"sync"
 )
 
diff --git a/go/genwrap.go b/go/genwrap.go
index b7cd6c0..b9a8201 100644
--- a/go/genwrap.go
+++ b/go/genwrap.go
@@ -81,7 +81,7 @@ func genVersion() {
 	if minVersion != version {
 		panic(fmt.Errorf("Found proton-c version %v, expected %v. Update minVersion in genwrap.go if you want to increase the minimum required proton-c version.", version, minVersion))
 	}
-	out, err := os.Create("src/qpid.apache.org/amqp/version.go")
+	out, err := os.Create("pkg/amqp/version.go")
 	panicIf(err)
 	defer out.Close()
 	splitVersion := strings.Split(minVersion, ".")
@@ -94,14 +94,14 @@ package amqp
 
 // #include <proton/version.h>
 // #if PN_VERSION_MAJOR == %s && PN_VERSION_MINOR < %s
-// #error packages qpid.apache.org/... require Proton-C library version 0.10 or greater
+// #error module github.com/apache/qpid-proton requires Proton-C library version 0.10 or greater
 // #endif
 import "C"
 `, splitVersion[0], splitVersion[1])
 }
 
 func genWrappers() {
-	outPath := "src/qpid.apache.org/proton/wrappers_gen.go"
+	outPath := "pkg/proton/wrappers_gen.go"
 	out, err := os.Create(outPath)
 	panicIf(err)
 	defer out.Close()
diff --git a/go/src/qpid.apache.org/README.md b/go/pkg/README.md
similarity index 91%
rename from go/src/qpid.apache.org/README.md
rename to go/pkg/README.md
index 8e34ea2..dbbafe7 100644
--- a/go/src/qpid.apache.org/README.md
+++ b/go/pkg/README.md
@@ -1,8 +1,8 @@
 # Qpid Go packages for AMQP
 
-These packages provide [Go](http://golang.org) support for sending and receiving
+These packages provide [Go](https://golang.org) support for sending and receiving
 AMQP messages in client or server applications. Reference documentation is
-available at: <http://godoc.org/?q=qpid.apache.org>
+available at: <https://godoc.org/github.com/apache/qpid-proton>
 
 They require the
 [proton-C library and header files](http://qpid.apache.org/proton) to be
@@ -25,18 +25,18 @@ add them to the following environment variables:
 
 There are 3 packages:
 
-[qpid.apache.org/amqp](http://godoc.org/qpid.apache.org/amqp) provides functions
+[amqp](http://godoc.org/github.com/apache/qpid-proton/go/pkg/amqp) provides functions
 to convert AMQP messages and data types to and from Go data types.  Used by both
 the proton and electron packages to manage AMQP data.
 
-[qpid.apache.org/electron](http://godoc.org/qpid.apache.org/electron) is a
+[electron](http://godoc.org/github.com/apache/qpid-proton/go/pkg/electron) is a
 simple, concurrent-safe API for sending and receiving messages. It can be used
 with goroutines and channels to build concurrent AMQP clients and servers.
 
-[qpid.apache.org/proton](http://godoc.org/qpid.apache.org/proton) is an
+[proton](http://godoc.org/github.com/apache/qpid-proton/go/pkg/proton) is an
 event-driven, concurrent-unsafe package that closely follows the proton C
 API. Most Go programmers will find the
-[electron](http://godoc.org/qpid.apache.org/electron) package easier to use.
+[electron](http://godoc.org/github.com/apache/qpid-proton/go/pkg/electron) package easier to use.
 
 See the [examples](https://github.com/apache/qpid-proton/blob/master/go/examples/README.md)
 to help you get started.
diff --git a/go/src/qpid.apache.org/amqp/doc.go b/go/pkg/amqp/doc.go
similarity index 100%
rename from go/src/qpid.apache.org/amqp/doc.go
rename to go/pkg/amqp/doc.go
diff --git a/go/src/qpid.apache.org/amqp/error.go b/go/pkg/amqp/error.go
similarity index 100%
rename from go/src/qpid.apache.org/amqp/error.go
rename to go/pkg/amqp/error.go
diff --git a/go/src/qpid.apache.org/amqp/interop_test.go b/go/pkg/amqp/interop_test.go
similarity index 99%
rename from go/src/qpid.apache.org/amqp/interop_test.go
rename to go/pkg/amqp/interop_test.go
index c3b0906..38bad69 100644
--- a/go/src/qpid.apache.org/amqp/interop_test.go
+++ b/go/pkg/amqp/interop_test.go
@@ -31,7 +31,7 @@ import (
 	"strings"
 	"testing"
 
-	"qpid.apache.org/internal/test"
+	"github.com/apache/qpid-proton/go/pkg/internal/test"
 )
 
 var skipped = false
diff --git a/go/src/qpid.apache.org/amqp/marshal.go b/go/pkg/amqp/marshal.go
similarity index 100%
rename from go/src/qpid.apache.org/amqp/marshal.go
rename to go/pkg/amqp/marshal.go
diff --git a/go/src/qpid.apache.org/amqp/marshal_test.go b/go/pkg/amqp/marshal_test.go
similarity index 98%
rename from go/src/qpid.apache.org/amqp/marshal_test.go
rename to go/pkg/amqp/marshal_test.go
index f3c10a3..4478822 100644
--- a/go/src/qpid.apache.org/amqp/marshal_test.go
+++ b/go/pkg/amqp/marshal_test.go
@@ -23,7 +23,7 @@ import (
 	"strings"
 	"testing"
 
-	"qpid.apache.org/internal/test"
+	"github.com/apache/qpid-proton/go/pkg/internal/test"
 )
 
 func TestSymbolKey(t *testing.T) {
diff --git a/go/src/qpid.apache.org/amqp/message.go b/go/pkg/amqp/message.go
similarity index 100%
rename from go/src/qpid.apache.org/amqp/message.go
rename to go/pkg/amqp/message.go
diff --git a/go/src/qpid.apache.org/amqp/message_test.go b/go/pkg/amqp/message_test.go
similarity index 99%
rename from go/src/qpid.apache.org/amqp/message_test.go
rename to go/pkg/amqp/message_test.go
index c396cc8..2e7b6b9 100644
--- a/go/src/qpid.apache.org/amqp/message_test.go
+++ b/go/pkg/amqp/message_test.go
@@ -24,7 +24,7 @@ import (
 	"testing"
 	"time"
 
-	"qpid.apache.org/internal/test"
+	"github.com/apache/qpid-proton/go/pkg/internal/test"
 )
 
 func roundTrip(m Message) error {
diff --git a/go/src/qpid.apache.org/amqp/types.go b/go/pkg/amqp/types.go
similarity index 100%
rename from go/src/qpid.apache.org/amqp/types.go
rename to go/pkg/amqp/types.go
diff --git a/go/src/qpid.apache.org/amqp/types_test.go b/go/pkg/amqp/types_test.go
similarity index 99%
rename from go/src/qpid.apache.org/amqp/types_test.go
rename to go/pkg/amqp/types_test.go
index 0f62225..64ade06 100644
--- a/go/src/qpid.apache.org/amqp/types_test.go
+++ b/go/pkg/amqp/types_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 	"time"
 
-	"qpid.apache.org/internal/test"
+	"github.com/apache/qpid-proton/go/pkg/internal/test"
 )
 
 func checkUnmarshal(marshaled []byte, v interface{}) error {
diff --git a/go/src/qpid.apache.org/amqp/unmarshal.go b/go/pkg/amqp/unmarshal.go
similarity index 100%
rename from go/src/qpid.apache.org/amqp/unmarshal.go
rename to go/pkg/amqp/unmarshal.go
diff --git a/go/src/qpid.apache.org/amqp/url.go b/go/pkg/amqp/url.go
similarity index 100%
rename from go/src/qpid.apache.org/amqp/url.go
rename to go/pkg/amqp/url.go
diff --git a/go/src/qpid.apache.org/amqp/url_test.go b/go/pkg/amqp/url_test.go
similarity index 100%
rename from go/src/qpid.apache.org/amqp/url_test.go
rename to go/pkg/amqp/url_test.go
diff --git a/go/src/qpid.apache.org/amqp/version.go b/go/pkg/amqp/version.go
similarity index 100%
rename from go/src/qpid.apache.org/amqp/version.go
rename to go/pkg/amqp/version.go
diff --git a/go/src/qpid.apache.org/electron/auth_test.go b/go/pkg/electron/auth_test.go
similarity index 98%
rename from go/src/qpid.apache.org/electron/auth_test.go
rename to go/pkg/electron/auth_test.go
index 9f73830..aa20f0b 100644
--- a/go/src/qpid.apache.org/electron/auth_test.go
+++ b/go/pkg/electron/auth_test.go
@@ -28,7 +28,7 @@ import (
 	"strings"
 	"testing"
 
-	"qpid.apache.org/internal/test"
+	"github.com/apache/qpid-proton/go/pkg/internal/test"
 )
 
 func TestAuthAnonymous(t *testing.T) {
diff --git a/go/src/qpid.apache.org/electron/benchmark_test.go b/go/pkg/electron/benchmark_test.go
similarity index 96%
rename from go/src/qpid.apache.org/electron/benchmark_test.go
rename to go/pkg/electron/benchmark_test.go
index 9ab2b9a..c65c5a5 100644
--- a/go/src/qpid.apache.org/electron/benchmark_test.go
+++ b/go/pkg/electron/benchmark_test.go
@@ -25,8 +25,8 @@ import (
 	"sync"
 	"testing"
 
-	"qpid.apache.org/amqp"
-	"qpid.apache.org/internal/test"
+	"github.com/apache/qpid-proton/go/pkg/amqp"
+	"github.com/apache/qpid-proton/go/pkg/internal/test"
 )
 
 // To change capacity use
diff --git a/go/src/qpid.apache.org/electron/common_test.go b/go/pkg/electron/common_test.go
similarity index 98%
rename from go/src/qpid.apache.org/electron/common_test.go
rename to go/pkg/electron/common_test.go
index 59ee616..5d57998 100644
--- a/go/src/qpid.apache.org/electron/common_test.go
+++ b/go/pkg/electron/common_test.go
@@ -24,7 +24,7 @@ import (
 	"sync"
 	"testing"
 
-	"qpid.apache.org/internal/test"
+	"github.com/apache/qpid-proton/go/pkg/internal/test"
 )
 
 // AMQP client/server pair
diff --git a/go/src/qpid.apache.org/electron/connection.go b/go/pkg/electron/connection.go
similarity index 99%
rename from go/src/qpid.apache.org/electron/connection.go
rename to go/pkg/electron/connection.go
index 464c4df..30c6cd5 100644
--- a/go/src/qpid.apache.org/electron/connection.go
+++ b/go/pkg/electron/connection.go
@@ -30,8 +30,8 @@ import (
 	"sync"
 	"time"
 
-	"qpid.apache.org/amqp"
-	"qpid.apache.org/proton"
+	"github.com/apache/qpid-proton/go/pkg/amqp"
+	"github.com/apache/qpid-proton/go/pkg/proton"
 )
 
 // Settings associated with a Connection.
diff --git a/go/src/qpid.apache.org/electron/container.go b/go/pkg/electron/container.go
similarity index 98%
rename from go/src/qpid.apache.org/electron/container.go
rename to go/pkg/electron/container.go
index 9990706..165cd8f 100644
--- a/go/src/qpid.apache.org/electron/container.go
+++ b/go/pkg/electron/container.go
@@ -24,7 +24,7 @@ import (
 	"strconv"
 	"sync/atomic"
 
-	"qpid.apache.org/proton"
+	"github.com/apache/qpid-proton/go/pkg/proton"
 )
 
 // Container is an AMQP container, it represents a single AMQP "application"
diff --git a/go/src/qpid.apache.org/electron/doc.go b/go/pkg/electron/doc.go
similarity index 96%
rename from go/src/qpid.apache.org/electron/doc.go
rename to go/pkg/electron/doc.go
index 2330992..70eaa28 100644
--- a/go/src/qpid.apache.org/electron/doc.go
+++ b/go/pkg/electron/doc.go
@@ -20,7 +20,7 @@ under the License.
 /*
 Package electron lets you write concurrent AMQP 1.0 messaging clients and servers.
 
-This package requires the [proton-C library](http://qpid.apache.org/proton) to be installed.
+This package requires the [proton-C library](http://github.com/apache/qpid-proton/go/pkg/proton) to be installed.
 
 Start by creating a Container with NewContainer. An AMQP Container represents a
 single AMQP "application" and can contain client and server connections.
diff --git a/go/src/qpid.apache.org/electron/electron_test.go b/go/pkg/electron/electron_test.go
similarity index 98%
rename from go/src/qpid.apache.org/electron/electron_test.go
rename to go/pkg/electron/electron_test.go
index 352a242..e8f5e74 100644
--- a/go/src/qpid.apache.org/electron/electron_test.go
+++ b/go/pkg/electron/electron_test.go
@@ -24,8 +24,8 @@ import (
 	"testing"
 	"time"
 
-	"qpid.apache.org/amqp"
-	"qpid.apache.org/internal/test"
+	"github.com/apache/qpid-proton/go/pkg/amqp"
+	"github.com/apache/qpid-proton/go/pkg/internal/test"
 )
 
 // Send a message one way with a client sender and server receiver, verify ack.
diff --git a/go/src/qpid.apache.org/electron/endpoint.go b/go/pkg/electron/endpoint.go
similarity index 99%
rename from go/src/qpid.apache.org/electron/endpoint.go
rename to go/pkg/electron/endpoint.go
index ea4eb70..47d693c 100644
--- a/go/src/qpid.apache.org/electron/endpoint.go
+++ b/go/pkg/electron/endpoint.go
@@ -22,7 +22,7 @@ package electron
 import (
 	"fmt"
 	"io"
-	"qpid.apache.org/proton"
+	"github.com/apache/qpid-proton/go/pkg/proton"
 )
 
 // Closed is an alias for io.EOF. It is returned as an error when an endpoint
diff --git a/go/src/qpid.apache.org/electron/example_client_server_test.go b/go/pkg/electron/example_client_server_test.go
similarity index 96%
rename from go/src/qpid.apache.org/electron/example_client_server_test.go
rename to go/pkg/electron/example_client_server_test.go
index 536d95b..5473873 100644
--- a/go/src/qpid.apache.org/electron/example_client_server_test.go
+++ b/go/pkg/electron/example_client_server_test.go
@@ -4,8 +4,8 @@ import (
 	"fmt"
 	"log"
 	"net"
-	"qpid.apache.org/amqp"
-	"qpid.apache.org/electron"
+	"github.com/apache/qpid-proton/go/pkg/amqp"
+	"github.com/apache/qpid-proton/go/pkg/electron"
 	"sync"
 )
 
diff --git a/go/src/qpid.apache.org/electron/handler.go b/go/pkg/electron/handler.go
similarity index 98%
rename from go/src/qpid.apache.org/electron/handler.go
rename to go/pkg/electron/handler.go
index dfb3b8a..2bb19da 100644
--- a/go/src/qpid.apache.org/electron/handler.go
+++ b/go/pkg/electron/handler.go
@@ -20,8 +20,8 @@ under the License.
 package electron
 
 import (
-	"qpid.apache.org/amqp"
-	"qpid.apache.org/proton"
+	"github.com/apache/qpid-proton/go/pkg/amqp"
+	"github.com/apache/qpid-proton/go/pkg/proton"
 )
 
 // NOTE: methods in this file are called only in the proton goroutine unless otherwise indicated.
diff --git a/go/src/qpid.apache.org/electron/link.go b/go/pkg/electron/link.go
similarity index 99%
rename from go/src/qpid.apache.org/electron/link.go
rename to go/pkg/electron/link.go
index dd974f5..303f815 100644
--- a/go/src/qpid.apache.org/electron/link.go
+++ b/go/pkg/electron/link.go
@@ -21,8 +21,8 @@ package electron
 
 import (
 	"fmt"
-	"qpid.apache.org/amqp"
-	"qpid.apache.org/proton"
+	"github.com/apache/qpid-proton/go/pkg/amqp"
+	"github.com/apache/qpid-proton/go/pkg/proton"
 	"time"
 )
 
diff --git a/go/src/qpid.apache.org/electron/link_test.go b/go/pkg/electron/link_test.go
similarity index 93%
rename from go/src/qpid.apache.org/electron/link_test.go
rename to go/pkg/electron/link_test.go
index 4041d8b..e6f1e2e 100644
--- a/go/src/qpid.apache.org/electron/link_test.go
+++ b/go/pkg/electron/link_test.go
@@ -25,9 +25,9 @@ import (
 	"testing"
 	"time"
 
-	"qpid.apache.org/amqp"
-	"qpid.apache.org/internal/test"
-	"qpid.apache.org/proton"
+	"github.com/apache/qpid-proton/go/pkg/amqp"
+	"github.com/apache/qpid-proton/go/pkg/internal/test"
+	"github.com/apache/qpid-proton/go/pkg/proton"
 )
 
 func TestLinkSettings(t *testing.T) {
diff --git a/go/src/qpid.apache.org/electron/receiver.go b/go/pkg/electron/receiver.go
similarity index 98%
rename from go/src/qpid.apache.org/electron/receiver.go
rename to go/pkg/electron/receiver.go
index eba300b..d412ac1 100644
--- a/go/src/qpid.apache.org/electron/receiver.go
+++ b/go/pkg/electron/receiver.go
@@ -23,8 +23,8 @@ import (
 	"fmt"
 	"time"
 
-	"qpid.apache.org/amqp"
-	"qpid.apache.org/proton"
+	"github.com/apache/qpid-proton/go/pkg/amqp"
+	"github.com/apache/qpid-proton/go/pkg/proton"
 )
 
 // Receiver is a Link that receives messages.
diff --git a/go/src/qpid.apache.org/electron/sender.go b/go/pkg/electron/sender.go
similarity index 98%
rename from go/src/qpid.apache.org/electron/sender.go
rename to go/pkg/electron/sender.go
index b461f08..eb8af85 100644
--- a/go/src/qpid.apache.org/electron/sender.go
+++ b/go/pkg/electron/sender.go
@@ -26,8 +26,8 @@ import (
 	"fmt"
 	"time"
 
-	"qpid.apache.org/amqp"
-	"qpid.apache.org/proton"
+	"github.com/apache/qpid-proton/go/pkg/amqp"
+	"github.com/apache/qpid-proton/go/pkg/proton"
 )
 
 // Sender is a Link that sends messages.
diff --git a/go/src/qpid.apache.org/electron/session.go b/go/pkg/electron/session.go
similarity index 98%
rename from go/src/qpid.apache.org/electron/session.go
rename to go/pkg/electron/session.go
index 7dc6030..6feeee8 100644
--- a/go/src/qpid.apache.org/electron/session.go
+++ b/go/pkg/electron/session.go
@@ -20,7 +20,7 @@ under the License.
 package electron
 
 import (
-	"qpid.apache.org/proton"
+	"github.com/apache/qpid-proton/go/pkg/proton"
 )
 
 // Session is an AMQP session, it contains Senders and Receivers.
diff --git a/go/src/qpid.apache.org/electron/time.go b/go/pkg/electron/time.go
similarity index 100%
rename from go/src/qpid.apache.org/electron/time.go
rename to go/pkg/electron/time.go
diff --git a/go/src/qpid.apache.org/internal/test/test.go b/go/pkg/internal/test/test.go
similarity index 100%
rename from go/src/qpid.apache.org/internal/test/test.go
rename to go/pkg/internal/test/test.go
diff --git a/go/src/qpid.apache.org/proton/doc.go b/go/pkg/proton/doc.go
similarity index 100%
rename from go/src/qpid.apache.org/proton/doc.go
rename to go/pkg/proton/doc.go
diff --git a/go/src/qpid.apache.org/proton/engine.go b/go/pkg/proton/engine.go
similarity index 100%
rename from go/src/qpid.apache.org/proton/engine.go
rename to go/pkg/proton/engine.go
diff --git a/go/src/qpid.apache.org/proton/error.go b/go/pkg/proton/error.go
similarity index 100%
rename from go/src/qpid.apache.org/proton/error.go
rename to go/pkg/proton/error.go
diff --git a/go/src/qpid.apache.org/proton/handlers.go b/go/pkg/proton/handlers.go
similarity index 100%
rename from go/src/qpid.apache.org/proton/handlers.go
rename to go/pkg/proton/handlers.go
diff --git a/go/src/qpid.apache.org/proton/message.go b/go/pkg/proton/message.go
similarity index 98%
rename from go/src/qpid.apache.org/proton/message.go
rename to go/pkg/proton/message.go
index 1f8ebe5..76df727 100644
--- a/go/src/qpid.apache.org/proton/message.go
+++ b/go/pkg/proton/message.go
@@ -29,7 +29,7 @@ import (
 	"strconv"
 	"sync/atomic"
 
-	"qpid.apache.org/amqp"
+	"github.com/apache/qpid-proton/go/pkg/amqp"
 )
 
 // HasMessage is true if all message data is available.
diff --git a/go/src/qpid.apache.org/proton/proton_test.go b/go/pkg/proton/proton_test.go
similarity index 97%
rename from go/src/qpid.apache.org/proton/proton_test.go
rename to go/pkg/proton/proton_test.go
index ac1b468..e575995 100644
--- a/go/src/qpid.apache.org/proton/proton_test.go
+++ b/go/pkg/proton/proton_test.go
@@ -25,7 +25,7 @@ import (
 	"testing"
 	"time"
 
-	"qpid.apache.org/internal/test"
+	"github.com/apache/qpid-proton/go/pkg/internal/test"
 )
 
 type events []EventType
diff --git a/go/src/qpid.apache.org/proton/uuid.go b/go/pkg/proton/uuid.go
similarity index 100%
rename from go/src/qpid.apache.org/proton/uuid.go
rename to go/pkg/proton/uuid.go
diff --git a/go/src/qpid.apache.org/proton/wrappers.go b/go/pkg/proton/wrappers.go
similarity index 99%
rename from go/src/qpid.apache.org/proton/wrappers.go
rename to go/pkg/proton/wrappers.go
index 42b2a23..724f693 100644
--- a/go/src/qpid.apache.org/proton/wrappers.go
+++ b/go/pkg/proton/wrappers.go
@@ -40,7 +40,7 @@ import (
 	"time"
 	"unsafe"
 
-	"qpid.apache.org/amqp"
+	"github.com/apache/qpid-proton/go/pkg/amqp"
 )
 
 // TODO aconway 2015-05-05: Documentation for generated types.
diff --git a/go/src/qpid.apache.org/proton/wrappers_gen.go b/go/pkg/proton/wrappers_gen.go
similarity index 100%
rename from go/src/qpid.apache.org/proton/wrappers_gen.go
rename to go/pkg/proton/wrappers_gen.go
diff --git a/go/src/qpid.apache.org/readme-go-get.md b/go/pkg/readme-go-get.md
similarity index 100%
rename from go/src/qpid.apache.org/readme-go-get.md
rename to go/pkg/readme-go-get.md


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