MCPcopy Create free account

hub / github.com/creasty/defaults / functions

Functions250 in github.com/creasty/defaults

FunctionTestSetter_CalledOnPointerToNonStruct
TestSetter_CalledOnPointerToNonStruct pins the setter calls a non-struct type gets: one behind a pointer the tag allocated, unless its unmarshaler too
setter_test.go:388
FunctionTestSetter_CalledOnRoot
(t *testing.T)
setter_test.go:100
FunctionTestSetter_CalledOnSliceElements
(t *testing.T)
setter_test.go:132
FunctionTestSetter_CalledOnStructField
(t *testing.T)
setter_test.go:109
FunctionTestSetter_CalledOnValueReceiver
TestSetter_CalledOnValueReceiver pins that a setter declared on a value receiver is called. The pointer's method set lists it as a wrapper the compile
setter_test.go:435
FunctionTestSetter_CanUpdateGuardPreservesCallerValue
(t *testing.T)
setter_test.go:183
FunctionTestSetter_EmbeddedPointerStruct
TestSetter_EmbeddedPointerStruct pins that a struct's own setter and an embedded one both run. setterOuter declares a SetDefaults, which hides SetterI
setter_test.go:198
FunctionTestSetter_InvocationCount
TestSetter_InvocationCount pins how many times Set calls a setter for each shape below: once. A struct behind a pointer used to get a second call, fr
setter_test.go:264
FunctionTestSetter_NotCalledThroughEmbeddedInterface
TestSetter_NotCalledThroughEmbeddedInterface pins that an embedded interface gets no setter, the same as a named one. Go promotes the interface's SetD
setter_test.go:228
FunctionTestSetter_NotCalledThroughNilEmbeddedPointer
TestSetter_NotCalledThroughNilEmbeddedPointer pins that an untagged nil embedded pointer gets no setter, the same as a named one. Go promotes the sett
setter_test.go:211
FunctionTestSetter_OverwritesCallerValueWhenUnguarded
TestSetter_OverwritesCallerValueWhenUnguarded pins that a setter is trusted absolutely: unlike a tag, it is not checked against the field's current va
setter_test.go:172
FunctionTestSetter_RunsAgainOnASecondSet
TestSetter_RunsAgainOnASecondSet pins that Set is not idempotent as far as setters go: calling it twice calls them twice over, which is why a setter h
setter_test.go:458
FunctionTestUnmarshalTag_NotOffered
TestUnmarshalTag_NotOffered covers the values an unmarshaler is not asked about at all, which leave the target as it was and report no error: there is
unmarshal_test.go:155
FunctionTestUnmarshalTag_Rejected
TestUnmarshalTag_Rejected covers what the caller reports when neither took the value: UnmarshalText's rejection, since it was asked first, and Unmarsh
unmarshal_test.go:133
FunctionTestUnmarshalTag_Taken
TestUnmarshalTag_Taken covers a value one of the target's unmarshalers takes, which is the whole point of offering it: the caller parses nothing itsel
unmarshal_test.go:85
FunctionTestUnmarshalTag_TextIsAskedFirst
TestUnmarshalTag_TextIsAskedFirst covers the order: a target that implements both is asked through UnmarshalText, and UnmarshalJSON is never offered t
unmarshal_test.go:119
FunctionTestWalking_KeyNamesTheValueItsTypeAndItsLength
TestWalking_KeyNamesTheValueItsTypeAndItsLength covers what an entry is to the index: two entries have one key only if they name the same value, under
path_test.go:163
FunctionTestWalking_LeaveTakesOnlyItsOwnEntryOut
TestWalking_LeaveTakesOnlyItsOwnEntryOut covers what leave does as a walk returns, called as it is on every return, including one the index never held
path_test.go:139
FunctionTestWalking_RepeatsFarIndexesThePathAboveIt
TestWalking_RepeatsFarIndexesThePathAboveIt covers the first check below scanDepth: it makes the index, gives it to every entry on the path, and adds
path_test.go:117
FunctionTestWalking_RepeatsNearFindsTheSameValueAbove
TestWalking_RepeatsNearFindsTheSameValueAbove covers the scan, which a value no more than scanDepth down is checked by: the whole path above it, for a
path_test.go:85
FunctionTestWalking_RepeatsNearLeavesDeeperValuesToRepeatsFar
TestWalking_RepeatsNearLeavesDeeperValuesToRepeatsFar covers the split between the two: the scan gives up below scanDepth, where it would cost more th
path_test.go:104
MethodUnmarshalJSON
(data []byte)
unmarshal_test.go:31
MethodUnmarshalJSON
(data []byte)
unmarshal_test.go:47
MethodUnmarshalJSON
(data []byte)
unmarshal_test.go:60
MethodUnmarshalJSON
([]byte)
unmarshal_test.go:73
MethodUnmarshalJSON
([]byte)
unmarshal_test.go:78
MethodUnmarshalJSON
(b []byte)
set_unmarshaler_test.go:23
MethodUnmarshalJSON
(b []byte)
set_unmarshaler_test.go:45
MethodUnmarshalJSON
(b []byte)
set_unmarshaler_test.go:84
MethodUnmarshalJSON
(b []byte)
set_unmarshaler_test.go:93
MethodUnmarshalJSON
([]byte)
set_unmarshaler_test.go:123
MethodUnmarshalJSON
([]byte)
set_unmarshaler_test.go:135
MethodUnmarshalJSON
([]byte)
set_unmarshaler_test.go:192
MethodUnmarshalJSON
([]byte)
benchmark_test.go:677
MethodUnmarshalText
(text []byte)
unmarshal_test.go:23
MethodUnmarshalText
(text []byte)
unmarshal_test.go:42
MethodUnmarshalText
([]byte)
unmarshal_test.go:58
MethodUnmarshalText
([]byte)
unmarshal_test.go:71
MethodUnmarshalText
(text []byte)
set_unmarshaler_test.go:57
MethodUnmarshalText
(text []byte)
set_unmarshaler_test.go:70
MethodUnmarshalText
([]byte)
set_unmarshaler_test.go:116
MethodUnmarshalText
([]byte)
set_unmarshaler_test.go:131
MethodUnmarshalText
([]byte)
set_unmarshaler_test.go:143
MethodUnmarshalText
(text []byte)
set_unmarshaler_test.go:153
MethodUnmarshalText
(text []byte)
set_unmarshaler_test.go:166
MethodUnmarshalText
(text []byte)
set_unmarshaler_test.go:181
MethodUnmarshalText
([]byte)
set_unmarshaler_test.go:199
MethodUnmarshalText
([]byte)
benchmark_test.go:675
MethodUnmarshalText
([]byte)
benchmark_test.go:684
FunctionbenchFail
benchFail measures a Set on a zero T that fails. valid checks the first error.
benchmark_test.go:600
← previous201–250 of 250, ranked by callers