Chromium Code Reviews| Index: third_party/golang/src/fmt/print.go |
| diff --git a/third_party/golang/src/fmt/print.go b/third_party/golang/src/fmt/print.go |
| index a84375b25e9161588d259a5da1b4805dc11971ed..c793a2e2b30f43efd4fa02805d40280e134b4d97 100644 |
| --- a/third_party/golang/src/fmt/print.go |
| +++ b/third_party/golang/src/fmt/print.go |
| @@ -998,7 +998,10 @@ BigSwitch: |
| v := f.Pointer() |
| // pointer to array or slice or struct? ok at top level |
| // but not embedded (avoid loops) |
| - if v != 0 && depth == 100 { |
|
rudominer
2015/11/04 23:02:34
Note that I screwed up the initial checkin. It was
|
| + // Note(rudominer) Local change. Deep print structures |
| + // that contain pointers. Original code reads: |
| + //if v != 0 && depth == 0 { |
|
azani
2015/11/04 23:07:47
nit: add space after //
|
| + if v != 0 && depth < 50 { |
| switch a := f.Elem(); a.Kind() { |
| case reflect.Array, reflect.Slice: |
| p.buf.WriteByte('&') |
| @@ -1012,6 +1015,11 @@ BigSwitch: |
| p.buf.WriteByte('&') |
| p.printValue(a, verb, depth+1) |
| break BigSwitch |
| + // Note(rudominer) Local change. Deep print pointers to strings. |
| + case reflect.String: |
| + p.buf.WriteByte('&') |
| + p.printValue(a, verb, depth+1) |
| + break BigSwitch |
| } |
| } |
| fallthrough |