Supply arguments to strings.Replace in the right order

This commit is contained in:
Mark Haines 2017-03-14 15:31:57 +00:00
parent 648b7c96d5
commit a70eb939b7

View file

@ -57,8 +57,8 @@ func main() {
} }
flag.Parse() flag.Parse()
*userID = strings.Replace("$SERVER_NAME", *serverName, *userID, 1) *userID = strings.Replace(*userID, "$SERVER_NAME", *serverName, 1)
*roomID = strings.Replace("$SERVER_NAME", *serverName, *roomID, 1) *roomID = strings.Replace(*roomID, "$SERVER_NAME", *serverName, 1)
// Decode the ed25519 private key. // Decode the ed25519 private key.
privateKeyBytes, err := base64.RawStdEncoding.DecodeString(*privateKeyString) privateKeyBytes, err := base64.RawStdEncoding.DecodeString(*privateKeyString)