MCPcopy Index your code

hub / github.com/cockroachdb/redact / functions

Functions332 in github.com/cockroachdb/redact

↓ 80 callersMethodPrintf
For printf, a linter checks that the format string is a constant literal, so the implementation can assume it's always safe.
interfaces/interfaces.go:83
↓ 65 callersMethodcheckInvariants
(t *testing.T)
internal/buffer/buffer_test.go:25
↓ 60 callersMethodcheckEqual
(t *testing.T, expected string)
internal/buffer/buffer_test.go:59
↓ 58 callersMethodrestore
()
internal/rfmt/helpers.go:79
↓ 49 callersMethodwriteString
(s string)
internal/rfmt/print.go:95
↓ 48 callersMethodSetMode
SetMode changes the output mode.
internal/buffer/buffer.go:259
↓ 47 callersFunctionSprintf
Sprintf formats the arguments and encloses unsafe bits between redaction markers. If either safe and unsafe bits of data contain the markers in their
markers_print.go:40
↓ 47 callersMethodWriteByte
WriteByte emits a single byte.
internal/buffer/buffer.go:153
↓ 38 callersMethodwriteByte
(c byte)
internal/rfmt/print.go:99
↓ 37 callersMethodWriteString
WriteString appends the contents of s to the buffer, growing the buffer as needed. The return value n is the length of s; err is always nil. If the bu
internal/buffer/buffer.go:143
↓ 36 callersMethodPrint
Print emits its arguments separated by spaces. For each argument it dynamically checks for the SafeFormatter or SafeValue interface and either use tha
interfaces/interfaces.go:78
↓ 33 callersMethodstartUnsafe
()
internal/rfmt/helpers.go:37
↓ 32 callersMethodRedact
Redact replaces all occurrences of unsafe substrings by the "Redacted" marker, ‹×›. Hash markers (‹†value›) are replaced with hashed values (‹hash›) i
internal/markers/markers.go:89
↓ 30 callersFunctionSafe
Safe turns any value into an object that is considered as safe by the formatter. This is provided as an “escape hatch” for cases where the other inte
api.go:168
↓ 24 callersMethodWriteRune
WriteRune emits a single rune.
internal/buffer/buffer.go:171
↓ 23 callersFunctionDisableHashing
DisableHashing disables hash-based redaction. Hash markers will be fully redacted instead of being replaced with hashes.
api.go:213
↓ 23 callersFunctionEnableHashing
EnableHashing enables hash-based redaction with an optional salt. Hash markers (‹†value›) will be replaced with hashes instead of being fully redacted
api.go:207
↓ 22 callersMethodString
()
internal/rfmt/print.go:75
↓ 22 callersMethodresetWithMode
(mode OutputMode)
internal/buffer/buffer_test.go:200
↓ 20 callersFunctionUnsafe
Unsafe turns any value that would otherwise be considered safe, into an unsafe value.
api.go:159
↓ 20 callersMethodWrite
Write appends the contents of p to the buffer, growing the buffer as needed. The return value n is the length of p; err is always nil. If the buffer b
internal/buffer/buffer.go:131
↓ 18 callersMethodfmtInteger
fmtInteger formats a signed or unsigned integer.
internal/rfmt/print.go:380
↓ 16 callersMethodstartSafeOverride
()
internal/rfmt/helpers.go:53
↓ 15 callersMethodRedactableString
RedactableString returns the bytes in the buffer.
internal/buffer/buffer.go:70
↓ 14 callersMethodReset
Reset resets the buffer to be empty, but it retains the underlying storage for use by future writes. It also resets the output mode to UnsafeEscaped.
internal/buffer/buffer.go:277
↓ 13 callersMethodStripMarkers
StripMarkers removes the redaction markers from the RedactableBytes. This returns an unsafe string where all safe and unsafe bits are mixed together.
internal/markers/markers.go:81
↓ 13 callersMethodWrite
Write is the function to call to emit formatted output to be printed.
internal/rfmt/print.go:51
↓ 11 callersMethodpad
pad appends b to f.buf, padded on left (!f.minus) or right (f.minus).
internal/rfmt/format.go:85
↓ 10 callersMethodSafeRune
SafeRune is part of the SafeWriter interface.
builder/builder.go:128
↓ 10 callersMethodWriteString
Implement WriteString so that we can call io.WriteString on a pp (through state), for efficiency.
internal/rfmt/print.go:200
↓ 10 callersMethodbadVerb
(verb rune)
internal/rfmt/print.go:338
↓ 10 callersMethodfree
free saves used pp structs in ppFree; avoids an allocation per invocation.
internal/rfmt/print.go:152
↓ 10 callersFunctionnewPrinter
newPrinter allocates a new pp struct or grabs a cached one.
internal/rfmt/print.go:142
↓ 9 callersMethodSafeRune
SafeRune emits a safe rune.
interfaces/interfaces.go:66
↓ 9 callersFunctionSprint
Sprint prints out the arguments and encloses unsafe bits between redaction markers. If either safe and unsafe bits of data contain the markers in thei
markers_print.go:29
↓ 9 callersMethodwritePadding
writePadding generates n bytes of padding.
internal/rfmt/format.go:67
↓ 7 callersMethodGetMode
GetMode retrieves the output mode.
internal/buffer/buffer.go:254
↓ 7 callersMethodSafeString
SafeString is part of the SafeWriter interface.
builder/builder.go:104
↓ 7 callersFunctionappendHash
appendHash computes a truncated hash of value and appends the hex result directly to dst, avoiding an intermediate allocation. Must only be called whe
internal/markers/hash.go:113
↓ 7 callersMethodcatchPanic
(arg interface{}, verb rune, method string)
internal/rfmt/print.go:572
↓ 7 callersMethodfinalize
finalize ensures that all the buffer is properly marked.
internal/buffer/buffer.go:184
↓ 7 callersMethodfmtFloat
fmtFloat formats a float. The default precision for each verb is specified as last argument in the call to fmt_float.
internal/rfmt/print.go:420
↓ 7 callersMethodgrow
grow grows the buffer to guarantee space for n more bytes. It returns the index where bytes should be written. If the buffer can't grow it will panic
internal/buffer/buffer.go:298
↓ 7 callersMethodprintArg
(arg interface{}, verb rune)
internal/rfmt/print.go:699
↓ 7 callersMethodtryGrowByReslice
tryGrowByReslice is a inlineable version of grow for the fast-case where the internal buffer only needs to be resliced. It returns the index where byt
internal/buffer/buffer.go:287
↓ 6 callersMethodLen
()
internal/rfmt/fmtsort/sort.go:28
↓ 6 callersMethodpadString
padString appends s to f.buf, padded on left (!f.minus) or right (f.minus).
internal/rfmt/format.go:103
↓ 6 callersMethodprintValue
printValue is similar to printArg but starts with a reflect value, not an interface{} value. It does not handle 'p' and 'T' verbs because these should
internal/rfmt/print.go:825
↓ 5 callersMethodFlag
Flag reports whether the flag c, a character, has been set.
internal/rfmt/print.go:58
↓ 5 callersMethodRedactableBytes
RedactableBytes returns the bytes in the buffer.
internal/buffer/buffer.go:61
↓ 5 callersMethodTakeRedactableString
TakeRedactableString returns the buffer contents and reinitializes the buffer. This saves a memory allocation compared to RedactableString().
internal/buffer/buffer.go:102
↓ 5 callersMethodfmt0x64
fmt0x64 formats a uint64 in hexadecimal and prefixes it with 0x or not, as requested, by temporarily setting the sharp flag.
internal/rfmt/print.go:371
↓ 5 callersMethodfmtString
(v string, verb rune)
internal/rfmt/print.go:460
↓ 5 callersMethodwrite
(p []byte)
internal/rfmt/print.go:91
↓ 4 callersFunctionDisableHashing
DisableHashing disables hash-based redaction. The pool and salt are intentionally left intact so that in-flight hashers (which captured the pool point
internal/markers/hash.go:101
↓ 4 callersFunctionEnableHashing
EnableHashing enables hash-based redaction with an optional salt. When salt is nil, hash markers use plain SHA-256. When salt is provided, hash marker
internal/markers/hash.go:75
↓ 4 callersMethodLen
()
util.go:60
↓ 4 callersFunctionSprint
Sprint formats using the default formats for its operands and returns the resulting string. Spaces are added between operands when neither is a string
internal/rfmt/print.go:255
↓ 4 callersMethodWriteByte
WriteByte shadows the ib.Buffer.WriteByte method.
builder/builder.go:77
↓ 4 callersMethodWriteRune
WriteRune shadows the ib.Buffer.WriteRune method.
builder/builder.go:83
↓ 4 callersMethodWriteString
WriteString shadows the ib.Buffer.WriteString method.
builder/builder.go:71
↓ 4 callersMethodclearflags
()
internal/rfmt/format.go:57
↓ 4 callersMethoddoPrintf
(format string, a []interface{})
internal/rfmt/print.go:1098
↓ 4 callersMethodfmtComplex
fmtComplex formats a complex number v with r = real(v) and j = imag(v) as (r+ji) using fmtFloat for r and j formatting.
internal/rfmt/print.go:442
↓ 4 callersMethodfmtS
fmtS formats a string.
internal/rfmt/format.go:352
↓ 4 callersFunctionmakeMixedInts
()
markers_test.go:696
↓ 4 callersMethodstartPreRedactable
()
internal/rfmt/helpers.go:45
↓ 4 callersMethodstartWrite
()
internal/buffer/buffer.go:214
↓ 4 callersMethodwriteRune
(r rune)
internal/rfmt/print.go:103
↓ 3 callersFunctionInternalEscapeBytes
InternalEscapeBytes escapes redaction markers in the provided buf starting at the location startLoc. The bytes before startLoc are considered safe (al
internal/escape/escape.go:34
↓ 3 callersMethodPrintf
Printf is part of the SafeWriter interface.
builder/builder.go:98
↓ 3 callersMethodSafeString
SafeString emits a safe string.
interfaces/interfaces.go:54
↓ 3 callersMethodTakeRedactableBytes
TakeRedactableBytes returns the buffer contents and reinitializes the buffer. This saves a memory allocation compared to RedactableBytes().
internal/buffer/buffer.go:90
↓ 3 callersMethodToBytes
ToBytes converts the string to a byte slice.
internal/markers/markers.go:60
↓ 3 callersMethodUnsafeRune
UnsafeRune writes an unsafe rune.
interfaces/interfaces.go:95
↓ 3 callersMethodargNumber
argNumber returns the next argument to evaluate, which is either the value of the passed-in argNum or the value of the bracketed integer that begins f
internal/rfmt/print.go:1071
↓ 3 callersMethoddoPrint
(a []interface{})
internal/rfmt/print.go:1274
↓ 3 callersFunctionfloatCompare
floatCompare compares two floating-point values. NaNs compare low.
internal/rfmt/fmtsort/sort.go:206
↓ 3 callersMethodfmtQ
fmtQ formats a string as a double-quoted, escaped Go string constant. If f.sharp is set a raw (backquoted) string may be returned instead if the strin
internal/rfmt/format.go:443
↓ 3 callersMethodhandleMethods
(verb rune)
internal/rfmt/print.go:606
↓ 3 callersFunctionparsenum
parsenum converts ASCII to integer. num is 0 (and isnum is false) if no number present.
internal/rfmt/print.go:314
↓ 3 callersMethodstartHashRedactable
()
internal/rfmt/helpers.go:100
↓ 3 callersFunctionstripMarkersBytes
stripMarkersBytes scans data for marker characters (‹, ›, †) and either removes them (when replacement is nil) or replaces them with the replacement b
internal/markers/markers.go:178
↓ 2 callersFunctionEscapeMarkers
EscapeMarkers escapes the special delimiters from the provided byte slice.
internal/markers/markers.go:156
↓ 2 callersFunctionFprint
These routines do not take a format string Fprint formats using the default formats for its operands and writes to w. Spaces are added between operand
internal/rfmt/print.go:238
↓ 2 callersFunctionFprintf
Fprintf is like Sprintf but outputs the redactable string to the provided Writer.
markers_print.go:85
↓ 2 callersFunctionFprintf
These routines end in 'f' and take a format string. Fprintf formats according to a format specifier and writes to w. It returns the number of bytes wr
internal/rfmt/print.go:210
↓ 2 callersMethodGetValue
()
internal/redact/wrappers.go:40
↓ 2 callersFunctionHelperForErrorf
HelperForErrorf is a helper to implement a redaction-aware fmt.Errorf-compatible function in a different package. It formats the string according to t
markers_print.go:53
↓ 2 callersFunctionJoinTo
JoinTo writes the given slice of values delimited by the provided delimiter to the given SafeWriter.
util.go:26
↓ 2 callersFunctionMakeFormat
MakeFormat reproduces the format currently active in fmt.State and verb. This is provided because Go's standard fmt.State does not make the original f
internal/fmtforward/make_format.go:45
↓ 2 callersMethodPrint
Print is part of the SafeWriter interface.
builder/builder.go:92
↓ 2 callersFunctionReproducePrintf
ReproducePrintf calls fmt.Print/fmt.Printf on the argument based on the details present in the fmt.State and writes to the io.Writer.
internal/fmtforward/make_format.go:27
↓ 2 callersMethodSafeByte
(s i.SafeByte)
builder/builder.go:133
↓ 2 callersMethodUnsafeByte
UnsafeByte writes an unsafe byte.
interfaces/interfaces.go:89
↓ 2 callersMethodUnsafeByte
UnsafeByte is part of the SafeWriter interface.
builder/builder.go:156
↓ 2 callersMethodUnsafeString
UnsafeString writes an unsafe string.
interfaces/interfaces.go:86
↓ 2 callersMethodUnsafeString
UnsafeString is part of the SafeWriter interface.
builder/builder.go:144
↓ 2 callersMethoddoPrintln
doPrintln is like doPrint but always adds a space between arguments and a newline after the last argument.
internal/rfmt/print.go:1290
↓ 2 callersMethodendRedactable
endRedactable adds the closing redaction marker.
internal/buffer/buffer.go:197
next →1–100 of 332, ranked by callers