Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/sanity-io/litter
/ functions
Functions
61 in github.com/sanity-io/litter
⨍
Functions
61
◇
Types & classes
19
↓ 32 callers
Method
write
(b []byte)
dump.go:69
↓ 15 callers
Function
runTestWithCfg
(t *testing.T, name string, cfg *litter.Options, cases ...interface{})
dump_test.go:281
↓ 7 callers
Method
dumpType
(v reflect.Value)
dump.go:100
↓ 7 callers
Method
dumpVal
(value reflect.Value)
dump.go:343
↓ 7 callers
Method
indent
()
dump.go:79
↓ 7 callers
Method
newlineWithPointerNameComment
()
dump.go:85
↓ 7 callers
Function
runTests
(t *testing.T, name string, cases ...interface{})
dump_test.go:301
↓ 7 callers
Method
writeString
(str string)
dump.go:75
↓ 5 callers
Method
add
Adds a pointer.
pointers.go:79
↓ 4 callers
Method
descendIntoPossiblePointer
(value reflect.Value, f func())
dump.go:310
↓ 4 callers
Function
isPointerValue
(v reflect.Value)
util.go:17
↓ 4 callers
Function
newDumpState
prepares a new state object for dumping the provided value
dump.go:473
↓ 4 callers
Function
ptrkeyFor
(v reflect.Value)
pointers.go:37
↓ 3 callers
Method
contains
Returns true if contains a pointer.
pointers.go:54
↓ 3 callers
Method
label
()
pointers.go:24
↓ 3 callers
Function
printNil
(w io.Writer)
print.go:48
↓ 2 callers
Method
Len
()
dump.go:542
↓ 2 callers
Method
Sdump
Sdump dumps a value to a string according to the options
dump.go:525
↓ 2 callers
Method
dump
(value interface{})
dump.go:299
↓ 2 callers
Method
dumpCustom
(v reflect.Value, buf *bytes.Buffer)
dump.go:261
↓ 2 callers
Method
pointerFor
registers that the value has been visited and checks to see if it is one of the pointers we will see multiple times. If it is, it returns a temporary
dump.go:462
↓ 2 callers
Function
printComplex
(w io.Writer, c complex128, floatPrecision int)
print.go:34
↓ 2 callers
Function
printFloat
(w io.Writer, val float64, precision int)
print.go:25
↓ 2 callers
Function
printInt
(w io.Writer, val int64, base int)
print.go:17
↓ 1 callers
Function
Dump
Dump a value to stdout.
dump.go:498
↓ 1 callers
Method
Dump
Dump a value to stdout according to the options
dump.go:513
↓ 1 callers
Function
assertEqualStringsWithDiff
(t *testing.T, expected, actual string, msgAndArgs ...interface{})
dump_test.go:330
↓ 1 callers
Method
consider
Recursively consider v and each of its children, updating the map according to the semantics of MapReusedPointers
pointers.go:106
↓ 1 callers
Function
deInterface
deInterface returns values inside of non-nil interfaces when possible. This is useful for data types like structs, arrays, slices, and maps which can
util.go:10
↓ 1 callers
Function
diffStrings
(t *testing.T, expected, actual string)
dump_test.go:305
↓ 1 callers
Method
dumpChan
(v reflect.Value)
dump.go:255
↓ 1 callers
Method
dumpFunc
(v reflect.Value)
dump.go:235
↓ 1 callers
Method
dumpMap
(v reflect.Value)
dump.go:193
↓ 1 callers
Method
dumpSlice
(v reflect.Value)
dump.go:113
↓ 1 callers
Method
dumpStruct
(v reflect.Value)
dump.go:136
↓ 1 callers
Method
get
Gets a pointer.
pointers.go:63
↓ 1 callers
Function
isZeroValue
(v reflect.Value)
util.go:25
↓ 1 callers
Function
mapReusedPointers
mapReusedPointers takes a structure, and recursively maps all pointers mentioned in the tree, detecting circular references, and providing a list of a
pointers.go:12
↓ 1 callers
Function
messageFromMsgAndArgs
(msgAndArgs ...interface{})
dump_test.go:345
↓ 1 callers
Function
printBool
(w io.Writer, value bool)
print.go:9
↓ 1 callers
Function
printUint
(w io.Writer, val uint64, base int)
print.go:21
↓ 1 callers
Method
put
Adds a pointer (slow path).
pointers.go:88
↓ 1 callers
Method
remove
Removes a pointer.
pointers.go:72
↓ 1 callers
Method
tryAddPointer
addPointer to the pointerMap, update reusedPointers. Returns true if pointer was reused
pointers.go:151
Function
D
D dumps a value to stdout, and is a shorthand for [Dump].
dump.go:503
Function
Function
(string, int)
dump_test.go:19
Method
Less
(i, j int)
dump.go:550
Method
LitterDump
(w io.Writer)
dump_test.go:46
Method
LitterDump
(w io.Writer)
dump_test.go:52
Method
LitterDump
(w io.Writer)
dump.go:24
Function
Sdump
Sdump dumps a value to a string.
dump.go:508
Method
Swap
(i, j int)
dump.go:546
Function
TestSdump_RecursiveMaps
(t *testing.T)
dump_test.go:251
Function
TestSdump_config
(t *testing.T)
dump_test.go:143
Function
TestSdump_customDumper
(t *testing.T)
dump_test.go:101
Function
TestSdump_maps
(t *testing.T)
dump_test.go:233
Function
TestSdump_multipleArgs
(t *testing.T)
dump_test.go:224
Function
TestSdump_nilIntefacesInStructs
(t *testing.T)
dump_test.go:131
Function
TestSdump_pointerAliasing
(t *testing.T)
dump_test.go:117
Function
TestSdump_primitives
(t *testing.T)
dump_test.go:56
Function
TestSdump_unexported
(t *testing.T)
dump_test.go:273