Explorar o código

fix off by one error in GetID

Matthew R Kasun %!s(int64=3) %!d(string=hai) anos
pai
achega
fd981f3d3a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      mq/mq.go

+ 1 - 1
mq/mq.go

@@ -175,5 +175,5 @@ func GetID(topic string) (string, error) {
 		return "", errors.New("invalid topic")
 	}
 	//the last part of the topic will be the node.ID
-	return parts[count], nil
+	return parts[count-1], nil
 }