1
0
mirror of https://github.com/golang/go synced 2024-11-18 04:14:49 -07:00

crypto: use fmt.Appendf

Change-Id: I022a221e2d73cd8c70e8e04b7046c388748646a5
Reviewed-on: https://go-review.googlesource.com/c/go/+/435696
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
cuiweixie 2022-09-28 10:44:32 +08:00 committed by Gopher Robot
parent 8d3631fcef
commit 690851ee3e

View File

@ -1338,7 +1338,7 @@ func (c *Config) writeKeyLog(label string, clientRandom, secret []byte) error {
return nil
}
logLine := []byte(fmt.Sprintf("%s %x %x\n", label, clientRandom, secret))
logLine := fmt.Appendf(nil, "%s %x %x\n", label, clientRandom, secret)
writerMutex.Lock()
_, err := c.KeyLogWriter.Write(logLine)