Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/google/go-querystring
/ functions
Functions
25 in github.com/google/go-querystring
⨍
Functions
25
◇
Types & classes
15
↓ 11 callers
Method
Contains
Contains checks whether the tagOptions contains the specified option.
query/encode.go:355
↓ 9 callers
Function
testValue
test that Values(input) matches want. If not, report an error on t.
query/encode_test.go:19
↓ 4 callers
Function
valueString
valueString returns the string representation of a value.
query/encode.go:279
↓ 3 callers
Function
Values
Values returns the url.Values encoding of v. Values expects to be passed a struct, and traverses it recursively using the following encoding rules.
query/encode.go:125
↓ 2 callers
Function
isEmptyValue
isEmptyValue checks if a value should be considered empty for the purposes of omitting fields with the "omitempty" option.
query/encode.go:316
↓ 2 callers
Function
parseTag
parseTag splits a struct field's url tag into its name and comma-separated options.
query/encode.go:349
↓ 1 callers
Method
EncodeValues
(key string, v *url.Values)
query/encode.go:39
↓ 1 callers
Method
IsZero
()
query/encode.go:333
↓ 1 callers
Function
reflectValue
reflectValue populates the values parameter from the struct fields in val. Embedded structs are followed recursively (using the rules defined in the V
query/encode.go:151
Method
EncodeValues
EncodeValues using key name of the form "{key}.N" where N increments with each value. A value of "err" will return an error.
query/encode_test.go:439
Method
EncodeValues
EncodeValues encodes values with leading underscores
query/encode_test.go:518
Method
EncodeValues
EncodeValues encodes a 0 as false, 1 as true, and nil as unknown. All other values cause an error.
query/encode_test.go:587
Function
TestIsEmptyValue
(t *testing.T)
query/encode_test.go:664
Function
TestParseTag
(t *testing.T)
query/encode_test.go:729
Function
TestValues_BasicTypes
(t *testing.T)
query/encode_test.go:29
Function
TestValues_CustomEncodingInt
(t *testing.T)
query/encode_test.go:523
Function
TestValues_CustomEncodingPointer
Test behavior when encoding is defined for a pointer of a custom type. Custom type should be able to encode values for nil pointers.
query/encode_test.go:598
Function
TestValues_CustomEncodingSlice
(t *testing.T)
query/encode_test.go:449
Function
TestValues_CustomEncoding_Error
One of the few ways reflectValues will return an error is if a custom encoder returns an error. Test all of the various ways that can happen.
query/encode_test.go:489
Function
TestValues_EmbeddedStructs
(t *testing.T)
query/encode_test.go:372
Function
TestValues_InvalidInput
(t *testing.T)
query/encode_test.go:427
Function
TestValues_NestedTypes
(t *testing.T)
query/encode_test.go:275
Function
TestValues_OmitEmpty
(t *testing.T)
query/encode_test.go:332
Function
TestValues_Pointers
(t *testing.T)
query/encode_test.go:100
Function
TestValues_Slices
(t *testing.T)
query/encode_test.go:136