Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/pquerna/ffjson
/ functions
Functions
575 in github.com/pquerna/ffjson
⨍
Functions
575
◇
Types & classes
395
↓ 92 callers
Method
Fatalf
(format string, args ...interface{})
tests/goser/goser_test.go:88
↓ 72 callers
Function
testType
(t *testing.T, base interface{}, ff interface{})
tests/ff_test.go:259
↓ 58 callers
Function
testTypeFuzz
Fuzz test for 1000 iterations
tests/fuzz_test.go:401
↓ 56 callers
Method
WriteByte
WriteByte appends the byte c to the buffer, growing the buffer as needed. The returned error is always nil, but is included to match bufio.Writer's Wr
fflib/v1/buffer.go:265
↓ 35 callers
Function
testExpectedError
(t *testing.T, expected error, xval string, ff json.Unmarshaler)
tests/ff_test.go:382
↓ 22 callers
Method
String
()
fflib/v1/buffer.go:28
↓ 20 callers
Method
Write
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
fflib/v1/buffer.go:176
↓ 19 callers
Function
testStrQuoted
(t *testing.T, str string)
tests/ff_string_test.go:148
↓ 17 callers
Function
testCycle
(t *testing.T, base interface{}, ff interface{})
tests/ff_test.go:328
↓ 17 callers
Function
tplStr
(t *template.Template, data interface{})
inception/template.go:53
↓ 15 callers
Function
NewFFLexer
(input []byte)
fflib/v1/lexer.go:110
↓ 14 callers
Method
readByte
()
fflib/v1/lexer.go:174
↓ 14 callers
Function
testExpectedXValBare
(t *testing.T, expected interface{}, xval string, ff interface{})
tests/ff_test.go:370
↓ 12 callers
Method
Bytes
Bytes returns a slice of the contents of the unread portion of the buffer; len(b.Bytes()) == b.Len(). If the caller changes the contents of the retur
fflib/v1/buffer.go:92
↓ 12 callers
Method
Flush
Flush will return all queued writes, and return "" (empty string) in nothing has been queued "buf.WriteByte('" + byte + "')" + '\n' if one bute has be
inception/writerstack.go:35
↓ 12 callers
Method
UnmarshalJSON
UnmarshalJSON umarshall json to ip
tests/goser/ff/goser.go:176
↓ 12 callers
Function
testSameMarshal
(t *testing.T, base interface{}, ff interface{})
tests/ff_test.go:277
↓ 11 callers
Method
Write
Write will add a string to be written
inception/writerstack.go:11
↓ 11 callers
Function
assertTokensEqual
(t *testing.T, a []FFTok, b []FFTok)
fflib/v1/lexer_test.go:40
↓ 11 callers
Function
scanAll
(ffl *FFLexer)
fflib/v1/lexer_test.go:27
↓ 10 callers
Function
testExpectedXVal
(t *testing.T, expected interface{}, xval string, ff interface{})
tests/ff_test.go:378
↓ 9 callers
Function
newLogFFRecord
()
tests/ff_test.go:46
↓ 8 callers
Method
Reset
()
fflib/v1/buffer.go:23
↓ 7 callers
Method
Bytes
()
fflib/v1/buffer.go:27
↓ 7 callers
Method
Shift
Binary shift left (k > 0) or right (k < 0).
fflib/v1/internal/atof.go:836
↓ 7 callers
Method
Truncate
Truncate discards all but the first n unread bytes from the buffer. It panics if n is negative or greater than the length of the buffer.
fflib/v1/buffer.go:110
↓ 7 callers
Method
WriteFlush
WriteFlush will add a string and return the Flush result for the queue
inception/writerstack.go:54
↓ 7 callers
Function
equalIgnoreCase
can change for testing
fflib/v1/internal/atof.go:36
↓ 6 callers
Method
Contains
Contains reports whether a comma-separated list of options contains a particular substr flag. substr must be surrounded by a string boundary or commas
generator/tags.go:42
↓ 6 callers
Method
Encode
Encode the data in the supplied value to the stream given on creation. When the function returns the output has been written to the stream.
ffjson/encoder.go:58
↓ 6 callers
Method
Normalize
Normalize normalizes f so that the highest bit of the mantissa is set, and returns the number by which the mantissa was left-shifted.
fflib/v1/extfloat.go:199
↓ 6 callers
Method
Normalize
Normalize normalizes f so that the highest bit of the mantissa is set, and returns the number by which the mantissa was left-shifted.
fflib/v1/internal/extfloat.go:199
↓ 6 callers
Method
SliceString
(out DecodingBuffer)
fflib/v1/reader.go:223
↓ 6 callers
Method
UnmarshalJSON
UnmarshalJSON func
tests/ff.go:997
↓ 6 callers
Function
rangeError
(fn, str string)
fflib/v1/internal/atoi.go:51
↓ 6 callers
Function
scanToTok
(ffl *FFLexer, targetTok FFTok)
fflib/v1/lexer_test.go:56
↓ 5 callers
Method
Len
Len returns the number of bytes of the unread portion of the buffer; b.Len() == len(b.Bytes()).
fflib/v1/buffer.go:106
↓ 5 callers
Method
MarshalJSON
MarshalJSON func
tests/ff.go:1036
↓ 5 callers
Method
MarshalJSON
MarshalJSON set ip to json
tests/goser/ff/goser.go:163
↓ 5 callers
Method
Multiply
Multiply sets f to the product f*g: the result is correctly rounded, but not normalized.
fflib/v1/extfloat.go:235
↓ 5 callers
Method
Multiply
Multiply sets f to the product f*g: the result is correctly rounded, but not normalized.
fflib/v1/internal/extfloat.go:235
↓ 5 callers
Method
Pos
()
fflib/v1/reader.go:47
↓ 5 callers
Method
Write
(buf []byte)
tests/ff_test.go:110
↓ 5 callers
Method
WriteString
(s string)
fflib/v1/buffer.go:36
↓ 5 callers
Method
handleError
(err error)
inception/inception.go:123
↓ 5 callers
Function
max
(a, b int)
fflib/v1/internal/ftoa.go:470
↓ 5 callers
Function
newLogRecord
()
tests/ff_test.go:39
↓ 5 callers
Function
newffReader
(d []byte)
fflib/v1/reader.go:35
↓ 5 callers
Function
tDouble
(t *testing.T, input string, target float64)
fflib/v1/lexer_test.go:210
↓ 5 callers
Method
unreadByte
()
fflib/v1/lexer.go:186
↓ 4 callers
Method
DeleteLast
DeleteLast will delete the last added write
inception/writerstack.go:16
↓ 4 callers
Method
Error
()
fflib/v1/lexer.go:139
↓ 4 callers
Method
Round
Round a to nd digits (or fewer). If nd is zero, it means we're rounding just to the left of the digits, as in 0.09 -> 0.1.
fflib/v1/decimal.go:317
↓ 4 callers
Method
Round
Round a to nd digits (or fewer). If nd is zero, it means we're rounding just to the left of the digits, as in 0.09 -> 0.1.
fflib/v1/internal/atof.go:875
↓ 4 callers
Method
String
String returns the contents of the unread portion of the buffer as a string. If the Buffer is a nil pointer, it returns "<nil>".
fflib/v1/buffer.go:96
↓ 4 callers
Function
buildTokens
(containsOptional bool, optional string, required ...string)
inception/decoder.go:297
↓ 4 callers
Method
floatBits
(flt *floatInfo)
fflib/v1/internal/atof.go:275
↓ 4 callers
Function
getAllowTokens
(name string, tokens ...string)
inception/decoder.go:248
↓ 4 callers
Method
grow
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
fflib/v1/buffer.go:126
↓ 4 callers
Function
makeSlice
makeSlice allocates a slice of size n -- it will attempt to use a pool'ed instance whenever possible.
fflib/v1/buffer_pool.go:93
↓ 4 callers
Function
max
(a, b int)
fflib/v1/ftoa.go:455
↓ 4 callers
Function
tInt
(t *testing.T, input string, target int64)
fflib/v1/lexer_test.go:241
↓ 4 callers
Function
trim
trim trailing zeros from number. (They are meaningless; the decimal point is tracked independent of the number of digits.)
fflib/v1/decimal.go:71
↓ 4 callers
Function
trim
trim trailing zeros from number. (They are meaningless; the decimal point is tracked independent of the number of digits.)
fflib/v1/internal/atof.go:629
↓ 3 callers
Method
Assign
Assign v to a.
fflib/v1/decimal.go:81
↓ 3 callers
Method
Assign
Assign v to a.
fflib/v1/internal/atof.go:639
↓ 3 callers
Method
Execute
()
inception/inception.go:128
↓ 3 callers
Function
Pool
Send a buffer to the Pool to reuse for other instances. You may no longer utilize the content of the buffer, since it may be used by other goroutines.
fflib/v1/buffer_pool.go:67
↓ 3 callers
Method
Scan
()
fflib/v1/lexer.go:390
↓ 3 callers
Method
Shift
Binary shift left (k > 0) or right (k < 0).
fflib/v1/decimal.go:278
↓ 3 callers
Method
UnmarshalJSONFFLexer
(l *fflib.FFLexer, state fflib.FFParseState)
ffjson/marshal.go:32
↓ 3 callers
Function
WriteJson
** * Function ported from encoding/json: func (e *encodeState) string(s string) (int, error) */
fflib/v1/jsonstring.go:48
↓ 3 callers
Function
bigFtoa
bigFtoa uses multiprecision computations to format a float.
fflib/v1/ftoa.go:148
↓ 3 callers
Function
bigFtoa
bigFtoa uses multiprecision computations to format a float.
fflib/v1/internal/ftoa.go:155
↓ 3 callers
Function
getBaseData
(b fatalF)
tests/goser/goser_test.go:91
↓ 3 callers
Function
getNumberHandler
(ic *Inception, name string, takeAddr bool, typ reflect.Type, parsefunc string)
inception/decoder.go:255
↓ 3 callers
Function
poolNum
This returns the pool number that will give a buffer of at least 'i' bytes.
fflib/v1/buffer_pool.go:28
↓ 3 callers
Function
syntaxError
(fn, str string)
fflib/v1/internal/atoi.go:47
↓ 3 callers
Function
testTypeFuzzN
Fuzz test for N iterations
tests/fuzz_test.go:406
↓ 3 callers
Function
typeInInception
(ic *Inception, typ reflect.Type, f shared.Feature)
inception/encoder.go:27
↓ 3 callers
Method
wantBytes
(want []byte, iftrue FFTok)
fflib/v1/lexer.go:190
↓ 2 callers
Method
AssignDecimal
AssignDecimal sets f to an approximate value mantissa*10^exp. It returns true if the value represented by f is guaranteed to be the best approximation
fflib/v1/internal/extfloat.go:262
↓ 2 callers
Method
Contains
Contains reports whether a comma-separated list of options contains a particular substr flag. substr must be surrounded by a string boundary or commas
inception/tags.go:43
↓ 2 callers
Method
Decode
Decode the data in the supplied data slice.
ffjson/decoder.go:41
↓ 2 callers
Method
Encode
(interface{})
fflib/v1/buffer.go:48
↓ 2 callers
Method
EncodeFast
EncodeFast will unmarshal the data if fast marshall is available. This function can be used if you want to be sure the fast marshal is used or in test
ffjson/encoder.go:79
↓ 2 callers
Method
GetQueued
GetQueued will return the current queued content without flushing.
inception/writerstack.go:60
↓ 2 callers
Method
HasFeature
(f Feature)
shared/options.go:38
↓ 2 callers
Method
MarshalJSONBuf
(buf fflib.EncodingBuffer)
ffjson/marshal.go:28
↓ 2 callers
Method
PosWithLine
Calculates the Position with line and line offset, because this isn't counted for performance reasons, it will iterate the buffer from the beginning,
fflib/v1/reader.go:62
↓ 2 callers
Method
ReadByte
ReadByte reads and returns the next byte from the buffer. If no byte is available, it returns error io.EOF.
fflib/v1/buffer.go:334
↓ 2 callers
Method
Reset
Reset resets the buffer so it has no content. b.Reset() is the same as b.Truncate(0).
fflib/v1/buffer.go:121
↓ 2 callers
Method
RoundDown
Round a down to nd digits (or fewer).
fflib/v1/decimal.go:329
↓ 2 callers
Method
RoundDown
Round a down to nd digits (or fewer).
fflib/v1/internal/atof.go:887
↓ 2 callers
Method
RoundUp
Round a up to nd digits (or fewer).
fflib/v1/decimal.go:338
↓ 2 callers
Method
RoundUp
Round a up to nd digits (or fewer).
fflib/v1/internal/atof.go:896
↓ 2 callers
Method
Slice
(start, stop int)
fflib/v1/reader.go:43
↓ 2 callers
Method
ToError
TODO(pquerna): return line number and offset.
fflib/v1/lexer.go:574
↓ 2 callers
Function
WriteJsonString
(buf JsonStringWriter, s string)
fflib/v1/jsonstring.go:41
↓ 2 callers
Method
WriteRune
(r rune)
fflib/v1/buffer.go:32
next →
1–100 of 575, ranked by callers