From a70eb939b70e0d7e4210f25fce08dd0c418f4bd3 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Tue, 14 Mar 2017 15:31:57 +0000 Subject: [PATCH] Supply arguments to strings.Replace in the right order --- .../matrix-org/dendrite/tools/create-room-events/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/github.com/matrix-org/dendrite/tools/create-room-events/main.go b/src/github.com/matrix-org/dendrite/tools/create-room-events/main.go index 37f3892f5..18c4906e1 100644 --- a/src/github.com/matrix-org/dendrite/tools/create-room-events/main.go +++ b/src/github.com/matrix-org/dendrite/tools/create-room-events/main.go @@ -57,8 +57,8 @@ func main() { } flag.Parse() - *userID = strings.Replace("$SERVER_NAME", *serverName, *userID, 1) - *roomID = strings.Replace("$SERVER_NAME", *serverName, *roomID, 1) + *userID = strings.Replace(*userID, "$SERVER_NAME", *serverName, 1) + *roomID = strings.Replace(*roomID, "$SERVER_NAME", *serverName, 1) // Decode the ed25519 private key. privateKeyBytes, err := base64.RawStdEncoding.DecodeString(*privateKeyString)