Skip to content

Commit

Permalink
refactor: replaced bytes.NewBuffer with bytes.NewBufferString (#160)
Browse files Browse the repository at this point in the history
This PR change one function of bytes package with a similar one, as result code
produce less allocations on heap.
  • Loading branch information
butuzov authored Oct 20, 2021
1 parent c8672ca commit 4b3e72d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ var towerCmd = &cobra.Command{
}

viper.SetConfigType("yaml")
err = viper.ReadConfig(bytes.NewBuffer([]byte(configParsed)))
err = viper.ReadConfig(bytes.NewBufferString(configParsed))

if err != nil {
panic(fmt.Sprintf(
Expand Down

0 comments on commit 4b3e72d

Please sign in to comment.