Skip to content

Commit c874d56

Browse files
committed
Comments on PR
1 parent ccdf10c commit c874d56

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

CHANGES.md renamed to CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# Changelog
22

3-
## May 2018 - v1.0.0
3+
## May 2018
44

5-
* Released v1.0.0 of this repository for use with golang dependency management tools
65
* Corrected package imports
76
* Formatted go code with `go fmt`
87
* Rearranged this file
98
* Removed logging from golang package `mqmetric`
109
* Moved samples to a separate repository
1110

12-
## March 2018
11+
## March 2018 - v1.0.0
1312

1413
* Added V9.0.5 constant definitions
1514
* Changed #cgo directives for Windows now the compiler supports standard path names
1615
* Added mechanism to set MQ userid and password for Prometheus monitor
16+
* Released v1.0.0 of this repository for use with golang dependency management tools
1717

18-
##October 2017
18+
## October 2017
1919

2020
* Added V9.0.4 constant definitions - now generated from original MQ source code
2121
* Added MQSC script to show how to redefine event queues for pub/sub

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ If you are unfamiliar with Go, the following steps can help create a working env
7272

7373
* Make sure your PATH includes routes to the Go compiler (`$GOROOT/bin`), the Git client, and the C compiler.
7474
* Change directory to the workspace you created earlier. (`cd $GOPATH`)
75-
* Use git to get a copy of the MQ components into a new directory in the workspace. Use "src" as the destination, to get the directory created automatically; this path will then be searched by the Go compiler.
75+
* Use git to get a copy of the MQ components into a new directory in the workspace.
7676

7777
```git clone https://github.com/ibm-messaging/mq-golang.git src/github.com/ibm-messaging/mq-golang```
7878

mqmetric/discover.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func discoverClasses(metaPrefix string) error {
167167
}
168168

169169
subsOpened = true
170-
return nil
170+
return err
171171
}
172172

173173
func discoverTypes(cl *MonClass) error {
@@ -380,7 +380,7 @@ func discoverQueues(monitoredQueues string) error {
380380
err = cmdQObj.Put(putmqmd, pmo, buf)
381381

382382
if err != nil {
383-
return fmt.Errorf("%v", err)
383+
return err
384384
}
385385

386386
// Now get the response
@@ -423,7 +423,7 @@ func discoverQueues(monitoredQueues string) error {
423423
}
424424
}
425425
} else {
426-
return fmt.Errorf("%v", err)
426+
return err
427427
}
428428
}
429429

@@ -453,7 +453,7 @@ func createSubscriptions() error {
453453
}
454454

455455
if err != nil {
456-
return fmt.Errorf("Error subscribing: %v", err)
456+
return fmt.Errorf("Error subscribing to %s: %v", ty.ObjectTopic, err)
457457
}
458458
}
459459
}
@@ -698,7 +698,7 @@ func ReadPatterns(f string) (string, error) {
698698

699699
file, err := os.Open(f)
700700
if err != nil {
701-
return "", fmt.Errorf("Opening file %s: %s", f, err)
701+
return "", fmt.Errorf("Error Opening file %s: %v", f, err)
702702
}
703703
defer file.Close()
704704
scanner := bufio.NewScanner(file)
@@ -709,7 +709,7 @@ func ReadPatterns(f string) (string, error) {
709709
s += scanner.Text()
710710
}
711711
if err := scanner.Err(); err != nil {
712-
return "", fmt.Errorf("Reading from %s: %s", f, err)
712+
return "", fmt.Errorf("Error Reading from %s: %v", f, err)
713713
}
714714

715715
return s, nil

mqmetric/mqif.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,10 @@ func InitConnectionStats(qMgrName string, replyQ string, statsQ string, cc *Conn
124124
}
125125

126126
if err != nil {
127-
return fmt.Errorf("Cannot access qmgr. Error %s", err)
127+
return fmt.Errorf("Cannot access queue manager. Error: %v", err)
128128
}
129129

130-
return nil
130+
return err
131131
}
132132

133133
/*
@@ -202,10 +202,10 @@ func getMessageWithHObj(wait bool, hObj ibmmq.MQObject) ([]byte, error) {
202202
if mqreturn.MQRC == ibmmq.MQRC_Q_MGR_NOT_AVAILABLE ||
203203
mqreturn.MQRC == ibmmq.MQRC_Q_MGR_NAME_ERROR ||
204204
mqreturn.MQRC == ibmmq.MQRC_Q_MGR_QUIESCING {
205-
return nil, fmt.Errorf("Queue Manager error: ", err)
205+
return nil, fmt.Errorf("Queue Manager error: %v", err)
206206
}
207207
if mqreturn.MQCC == ibmmq.MQCC_FAILED && mqreturn.MQRC != ibmmq.MQRC_NO_MSG_AVAILABLE {
208-
return nil, fmt.Errorf("Get message: ", err)
208+
return nil, fmt.Errorf("Get message error: %v", err)
209209
}
210210
}
211211

@@ -232,6 +232,6 @@ func subscribe(topic string) (ibmmq.MQObject, error) {
232232
if err != nil {
233233
return subObj, fmt.Errorf("Error subscribing to topic '%s': %v", topic, err)
234234
}
235-
return subObj, nil
236235

236+
return subObj, err
237237
}

0 commit comments

Comments
 (0)