Skip to content

Commit

Permalink
starlark: correct writeValue docs (google#167)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
josharian authored and adonovan committed Mar 2, 2019
1 parent 75cc838 commit 81e440d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion starlark/value.go
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ func toString(v Value) string {
// path is used to detect cycles.
// It contains the list of *List and *Dict values we're currently printing.
// (These are the only potentially cyclic structures.)
// Callers should generally pass a temporary slice of length zero but non-zero capacity.
// Callers should generally pass nil for path.
// It is safe to re-use the same path slice for multiple calls.
func writeValue(out *strings.Builder, x Value, path []Value) {
switch x := x.(type) {
Expand Down

0 comments on commit 81e440d

Please sign in to comment.