refactor(example): polish rocketmq go example
Add credential declaration
diff --git a/examples/main.go b/examples/main.go
index 8a353f1..2334d45 100644
--- a/examples/main.go
+++ b/examples/main.go
@@ -42,8 +42,13 @@
switch kingpin.MustParse(rmq.Parse(os.Args[1:])) {
case produce.FullCommand():
pConfig := &rocketmq.ProducerConfig{ClientConfig: rocketmq.ClientConfig{
- GroupID: *gid,
- NameServer: *namesrv,
+ GroupID: "MQ_INST_xxxxxxx%GID",
+ NameServer: "http://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:80",
+ Credentials:&rocketmq.SessionCredentials{
+ AccessKey:"xxxxxx",
+ SecretKey:"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+ Channel:"mq-channel",
+ },
LogC: &rocketmq.LogConfig{
Path: "example",
FileSize: 64 * 1 << 10,