(s string)
| 86 | } |
| 87 | |
| 88 | func (w *PprofWriter) string(s string) int64 { |
| 89 | if idx, ok := w.stringTableIndex[s]; ok { |
| 90 | return idx |
| 91 | } |
| 92 | |
| 93 | idx := int64(len(w.res.StringTable)) |
| 94 | w.res.StringTable = append(w.res.StringTable, s) |
| 95 | w.stringTableIndex[s] = idx |
| 96 | return idx |
| 97 | } |
| 98 | |
| 99 | func (w *PprofWriter) byteString(s []byte) int64 { |
| 100 | if idx, ok := w.stringTableIndex[unsafeString(s)]; ok { |
no outgoing calls
no test coverage detected