-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.release-blocker
Milestone
Description
This program:
package main
import (
"fmt"
"strings"
)
func main() {
var b1 strings.Builder
b1.Grow(3)
b2 := b1
b1.WriteString("foo")
s := b1.String()
fmt.Printf("string before patching: %#v\n", s)
b2.WriteString("bar")
fmt.Printf("string after patching: %#v\n", s)
}
Prints:
string before patching: "foo"
string after patching: "bar"
I think another level of indirection is needed in the implementation, so that the internal buffer is shared even after a copy has been made.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.release-blocker