Skip to content

Commit 81e440d

Browse files
josharianadonovan
authored andcommitted
starlark: correct writeValue docs (google#167)
In PR google#86, we considered multiple APIs for writeValue. We settled on passing a nil path, but the doc comment missed that. Fix it now.
1 parent 75cc838 commit 81e440d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

starlark/value.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -989,7 +989,7 @@ func toString(v Value) string {
989989
// path is used to detect cycles.
990990
// It contains the list of *List and *Dict values we're currently printing.
991991
// (These are the only potentially cyclic structures.)
992-
// Callers should generally pass a temporary slice of length zero but non-zero capacity.
992+
// Callers should generally pass nil for path.
993993
// It is safe to re-use the same path slice for multiple calls.
994994
func writeValue(out *strings.Builder, x Value, path []Value) {
995995
switch x := x.(type) {

0 commit comments

Comments
 (0)