Skip to content

Commit 5c2a81a

Browse files
committed
Convert to modules - update to v5
1 parent e06fc39 commit 5c2a81a

27 files changed

+44
-33
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Changelog
22
Newest updates are at the top of this file.
33

4+
## May 01 2020 - v5.0.0-alpha
5+
* Initial migration for Go modules (requires new major number)
6+
47
## Apr 02 2020 - v4.1.4
58
* Update for MQ 9.1.5
69
* ibmmq - Add message and header compression for MQCD (#137)

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
ARG BASE_IMAGE=ubuntu:19.04
15+
ARG BASE_IMAGE=ubuntu:19.10
1616
FROM $BASE_IMAGE
1717

1818
ARG GOPATH_ARG="/go"
1919

20-
ENV GOVERSION=1.12 \
20+
ENV GOVERSION=1.13 \
2121
GOPATH=$GOPATH_ARG \
2222
ORG="github.com/ibm-messaging"
2323

README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
This repository demonstrates how you can call IBM MQ from applications written in the Go language.
44

5-
> **NOTICE**: Please ensure that you use a dependency management tool such as [dep](https://github.com/golang/dep) or [Glide](http://glide.sh/), and add a specific version dependency.
6-
7-
This repository previously contained sample programs that exported MQ statistics to
5+
This repository previously contained programs that exported MQ statistics to
86
some monitoring packages. These have now been moved to a
97
[GitHub repository called mq-metric-samples](https://github.com/ibm-messaging/mq-metric-samples).
108

@@ -56,8 +54,7 @@ but subsequent steps are independent of the platform.
5654
### Linux
5755

5856
* Install the Go runtime and compiler. On Linux, the packaging may vary but a typical
59-
directory for the code is `/usr/lib/golang`.
60-
The compiler should be at least version 10. If you see an error similar to "ld: NULL not defined"
57+
directory for the code is `/usr/lib/golang`. If you see an error similar to "ld: NULL not defined"
6158
when building a program then it is likely you need to upgrade your compiler.
6259

6360

@@ -123,7 +120,7 @@ For example,
123120
```
124121

125122
* Compile the `ibmmq` component:
126-
123+
*
127124
`go install ./src/github.com/ibm-messaging/mq-golang/ibmmq`
128125

129126
* If you plan to use monitoring functions, then compile the `mqmetric` component:
@@ -137,8 +134,19 @@ For example,
137134
At this point, you should have a compiled copy of the program in `$GOPATH/bin`. See the
138135
`samples` directory for more sample programs.
139136

137+
## Building in a container
140138
The `buildSamples.sh` script in this directory can also be used to create a container which will
141-
compile the samples and copy them to a local directory.
139+
compile the samples and copy them to a local directory. If you use this approach, you do not need
140+
to install a local copy of the compiler and associated toold, though you will still need a copy of
141+
the MQ runtime libraries for wherever you execute the programs.
142+
143+
## Go Modules
144+
The packages in this repository are now set up to be used as Go modules. See the `go.mod` file in
145+
the root of the repository. This required a major version bump in the release stream.
146+
147+
Support for modules started to be introduced around Go 1.11 and has been firmed up in various
148+
modification level updates in each of the compiler levels since then. The module changes for this
149+
package were developed and tested with Go 1.13.6.
142150

143151
## Related Projects
144152

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
module github.com/ibm-messaging/mq-golang
1+
module github.com/ibm-messaging/mq-golang/v5
22

33
go 1.13

mqmetric/channel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ about running MQ channels
3030
*/
3131

3232
import (
33-
"github.com/ibm-messaging/mq-golang/ibmmq"
33+
"github.com/ibm-messaging/mq-golang/v5/ibmmq"
3434
"regexp"
3535
"strings"
3636
"time"

mqmetric/discover.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import (
3939
"regexp"
4040
"strings"
4141

42-
"github.com/ibm-messaging/mq-golang/ibmmq"
42+
"github.com/ibm-messaging/mq-golang/v5/ibmmq"
4343
)
4444

4545
// MonElement describes the real metric element generated by MQ

mqmetric/mqif.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ don't need to repeat common setups eg of MQMD or MQSD structures.
2626

2727
import (
2828
"fmt"
29-
"github.com/ibm-messaging/mq-golang/ibmmq"
29+
"github.com/ibm-messaging/mq-golang/v5/ibmmq"
3030
)
3131

3232
var (

mqmetric/mqmetric_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"os"
2222
"testing"
2323

24-
"github.com/ibm-messaging/mq-golang/ibmmq"
24+
"github.com/ibm-messaging/mq-golang/v5/ibmmq"
2525
)
2626

2727
func TestNormalise(t *testing.T) {

mqmetric/qmgr.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ about the MQ queue manager
3030
*/
3131

3232
import (
33-
"github.com/ibm-messaging/mq-golang/ibmmq"
33+
"github.com/ibm-messaging/mq-golang/v5/ibmmq"
3434
"strings"
3535
"time"
3636
)

mqmetric/queue.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ about MQ queues
3131

3232
import (
3333
// "fmt"
34-
"github.com/ibm-messaging/mq-golang/ibmmq"
34+
"github.com/ibm-messaging/mq-golang/v5/ibmmq"
3535
"strings"
3636
"time"
3737
)

0 commit comments

Comments
 (0)