Documentation
¶
Index ¶
- func ReflectIsNull(v reflect.Value) bool
- func SQLArrayLiteral(s []string) string
- func SplitArray(array string) ([]string, error)
- type BoolArray
- type FloatArray
- func (a FloatArray) Contains(value float64) bool
- func (a FloatArray) IsNull() bool
- func (a FloatArray) Len() int
- func (a FloatArray) Less(i, j int) bool
- func (a *FloatArray) Scan(src any) error
- func (a FloatArray) String() string
- func (a FloatArray) StringOr(nilStr string) string
- func (a FloatArray) Swap(i, j int)
- func (a FloatArray) Value() (driver.Value, error)
- type IntArray
- type JSON
- func (j JSON) Clone() JSON
- func (j JSON) GoString() string
- func (j JSON) IsEmpty() bool
- func (j JSON) IsNull() bool
- func (j *JSON) MarshalFrom(source any) error
- func (j JSON) MarshalJSON() ([]byte, error)
- func (j JSON) PrettyPrint(w io.Writer)
- func (j *JSON) Scan(src any) error
- func (j JSON) String() string
- func (j *JSON) UnmarshalJSON(sourceJSON []byte) error
- func (j JSON) UnmarshalTo(dest any) error
- func (j JSON) Valid() bool
- func (j JSON) Value() (driver.Value, error)
- type NonEmptyString
- func JoinNonEmptyStrings(separator string, strs ...NonEmptyString) NonEmptyString
- func NonEmptyStringFromError(err error) NonEmptyString
- func NonEmptyStringFromPtr(ptr *string) NonEmptyString
- func NonEmptyStringTrimSpace(str string) NonEmptyString
- func NonEmptyStringf(format string, a ...any) NonEmptyString
- func (n NonEmptyString) Get() string
- func (n NonEmptyString) IsNotNull() bool
- func (n NonEmptyString) IsNull() bool
- func (n NonEmptyString) MarshalJSON() ([]byte, error)
- func (n NonEmptyString) Ptr() *string
- func (n *NonEmptyString) Scan(value any) error
- func (n *NonEmptyString) Set(s string)
- func (n *NonEmptyString) SetNull()
- func (n NonEmptyString) StringOr(nullString string) string
- func (n NonEmptyString) TrimSpace() NonEmptyString
- func (n *NonEmptyString) UnmarshalText(text []byte) error
- func (n NonEmptyString) Value() (driver.Value, error)
- type NullBoolArray
- type NullFloatArray
- type NullIntArray
- type Nullable
- type StringArray
- type Time
- func (n Time) Add(duration time.Duration) Time
- func (n Time) AddDate(years int, months int, days int) Time
- func (n Time) AppendFormat(b []byte, layout string) []byte
- func (n Time) Equal(o Time) bool
- func (n Time) Format(layout string) string
- func (n Time) Get() time.Time
- func (n Time) GetOr(defaultTime time.Time) time.Time
- func (n Time) IsNotNull() bool
- func (n Time) IsNull() bool
- func (n Time) MarshalJSON() ([]byte, error)
- func (n Time) MarshalText() ([]byte, error)
- func (n Time) PrettyPrint(w io.Writer)
- func (n Time) Ptr() *time.Time
- func (n *Time) Scan(value any) error
- func (n *Time) Set(t time.Time)
- func (n *Time) SetNull()
- func (n Time) String() string
- func (n Time) StringOr(nullStr string) string
- func (n Time) UTC() Time
- func (n *Time) UnmarshalJSON(sourceJSON []byte) error
- func (n *Time) UnmarshalText(text []byte) error
- func (n Time) Value() (driver.Value, error)
- type TrimmedString
- func (s TrimmedString) Contains(substr string) bool
- func (s TrimmedString) ContainsAny(chars string) bool
- func (s TrimmedString) ContainsRune(r rune) bool
- func (s TrimmedString) Get() string
- func (s TrimmedString) HasPrefix(prefix string) bool
- func (s TrimmedString) HasSuffix(suffix string) bool
- func (s TrimmedString) IsNotNull() bool
- func (s TrimmedString) IsNull() bool
- func (s TrimmedString) MarshalJSON() ([]byte, error)
- func (s TrimmedString) MarshalText() ([]byte, error)
- func (s TrimmedString) MarshalXML(e *xml.Encoder, start xml.StartElement) error
- func (s TrimmedString) Ptr() *string
- func (s TrimmedString) ReplaceAll(old, new string) TrimmedString
- func (s *TrimmedString) Scan(value any) error
- func (s *TrimmedString) Set(str string)
- func (s *TrimmedString) SetNull()
- func (s TrimmedString) Split(sep string) []TrimmedString
- func (s TrimmedString) String() string
- func (s TrimmedString) StringOr(nullString string) string
- func (s TrimmedString) ToLower() TrimmedString
- func (s TrimmedString) ToUpper() TrimmedString
- func (s TrimmedString) ToValidUTF8(replacement string) TrimmedString
- func (s TrimmedString) TrimPrefix(prefix string) TrimmedString
- func (s TrimmedString) TrimSuffix(suffix string) TrimmedString
- func (s *TrimmedString) UnmarshalJSON(j []byte) error
- func (s *TrimmedString) UnmarshalText(text []byte) error
- func (s *TrimmedString) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
- func (s TrimmedString) Value() (driver.Value, error)
- type Zeroable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReflectIsNull ¶
ReflectIsNull returns if a reflect.Value contains either a nil value or implements the Nullable interface and returns true from IsNull or implements the Zeroable interface and returns true from IsZero. It's safe to call ReflectIsNull on any reflect.Value with true returned for the zero value of reflect.Value.
func SQLArrayLiteral ¶
SQLArrayLiteral joins the passed strings as an SQL array literal A nil slice will produce NULL, pass an empty non nil slice to get the empty SQL array literal {}.
func SplitArray ¶
SplitArray splits an SQL or JSON array into its top level elements. Array elements that are quoted strings will not be unquoted. Returns nil in case of an empty array ("{}" or "[]"). Passing "null" or "NULL" as array will return nil without an error.
Types ¶
type BoolArray ¶
BoolArray implements the sql.Scanner and driver.Valuer interfaces for a slice of bool. A nil slice is mapped to the SQL NULL value, and a non nil zero length slice to an empty SQL array '{}'.
type FloatArray ¶
type FloatArray []float64
FloatArray implements the sql.Scanner and driver.Valuer interfaces for a slice of float64. A nil slice is mapped to the SQL NULL value, and a non nil zero length slice to an empty SQL array '{}'.
func (FloatArray) Contains ¶
func (a FloatArray) Contains(value float64) bool
Contains reports if the passed value is present in a.
func (FloatArray) IsNull ¶
func (a FloatArray) IsNull() bool
IsNull returns true if a is nil. IsNull implements the Nullable interface.
func (FloatArray) Len ¶
func (a FloatArray) Len() int
Len is the number of elements in the collection. One of the methods to implement sort.Interface.
func (FloatArray) Less ¶
func (a FloatArray) Less(i, j int) bool
Less reports whether the element with index i should sort before the element with index j. One of the methods to implement sort.Interface.
func (*FloatArray) Scan ¶
func (a *FloatArray) Scan(src any) error
Scan implements the sql.Scanner interface.
func (FloatArray) String ¶
func (a FloatArray) String() string
String implements the fmt.Stringer interface
func (FloatArray) StringOr ¶
func (a FloatArray) StringOr(nilStr string) string
func (FloatArray) Swap ¶
func (a FloatArray) Swap(i, j int)
Swap swaps the elements with indexes i and j. One of the methods to implement sort.Interface.
type IntArray ¶
type IntArray []int64
IntArray implements the sql.Scanner and driver.Valuer interfaces for a slice of int64. A nil slice is mapped to the SQL NULL value, and a non nil zero length slice to an empty SQL array '{}'.
func (IntArray) Len ¶
Len is the number of elements in the collection. One of the methods to implement sort.Interface.
func (IntArray) Less ¶
Less reports whether the element with index i should sort before the element with index j. One of the methods to implement sort.Interface.
type JSON ¶
type JSON []byte
JSON is a []byte slice containing JSON text or nil as the representation of the JSON "null" value. that implements the interfaces: json.Marshaler, json.Unmarshaler, driver.Value, sql.Scanner. The nil value of the type JSON is marshalled as the JSON "null" and SQL NULL values. The JSON "null" and SQL NULL values are unmarshalled as nil value ot the type JSON.
func MarshalJSON ¶
func (JSON) IsEmpty ¶
IsEmpty returns true if j is nil, or an empty JSON value like "", "{}", or "[]"
func (*JSON) MarshalFrom ¶
MarshalFrom marshalles source as JSON and sets it at j when there was no error.
func (JSON) MarshalJSON ¶
MarshalJSON returns j as the JSON encoding of j. MarshalJSON implements encoding/json.Marshaler See the package function MarshalJSON to marshal a struct into JSON
func (JSON) PrettyPrint ¶
func (JSON) String ¶
String returns the JSON as string. String implements the fmt.Stringer interface.
func (*JSON) UnmarshalJSON ¶
UnmarshalJSON sets *j to a copy of sourceJSON. UnarshalJSON implements encoding/json.Unmarshaler See method Unmarshal for unmarshalling into a struct.
func (JSON) UnmarshalTo ¶
UnmarshalTo unmashalles the JSON of j to dest
type NonEmptyString ¶
type NonEmptyString string
NonEmptyString is a string type where the empty string value is interpreted as SQL NULL and JSON null by implementing the sql.Scanner and driver.Valuer interfaces and also json.Marshaler and json.Unmarshaler. Note that this type can't hold an empty string without interpreting it as not null SQL or JSON value.
const NonEmptyStringNull NonEmptyString = ""
NonEmptyStringNull is the SQL NULL and JSON null value for NonEmptyString.
func JoinNonEmptyStrings ¶
func JoinNonEmptyStrings(separator string, strs ...NonEmptyString) NonEmptyString
JoinNonEmptyStrings joins only those strings that are not empty/null with the passed separator between them.
func NonEmptyStringFromError ¶
func NonEmptyStringFromError(err error) NonEmptyString
NonEmptyStringFromError converts an error to a NonEmptyString interpreting a nil error as null value "" or else using err.Error() as value.
func NonEmptyStringFromPtr ¶
func NonEmptyStringFromPtr(ptr *string) NonEmptyString
NonEmptyStringFromPtr converts a string pointer to a NonEmptyString interpreting nil as null value "".
func NonEmptyStringTrimSpace ¶
func NonEmptyStringTrimSpace(str string) NonEmptyString
NonEmptyStringTrimSpace returns a NonEmptyString by trimming space from the passed string. If the passed string with trimmed space is an empty string then the NonEmptyString will represent null.
func NonEmptyStringf ¶
func NonEmptyStringf(format string, a ...any) NonEmptyString
NonEmptyStringf formats a string using fmt.Sprintf and returns it as NonEmptyString. An empty string will be interpreted as null value.
func (NonEmptyString) Get ¶
func (n NonEmptyString) Get() string
Get returns the non nullable string value or panics if the NonEmptyString is null. Note: check with IsNull before using Get!
func (NonEmptyString) IsNotNull ¶
func (n NonEmptyString) IsNotNull() bool
IsNotNull returns true if the string n is not empty.
func (NonEmptyString) IsNull ¶
func (n NonEmptyString) IsNull() bool
IsNull returns true if the string n is empty. IsNull implements the Nullable interface.
func (NonEmptyString) MarshalJSON ¶
func (n NonEmptyString) MarshalJSON() ([]byte, error)
MarshalJSON implements encoding/json.Marshaler by returning the JSON null value for an empty (null) string.
func (NonEmptyString) Ptr ¶
func (n NonEmptyString) Ptr() *string
Ptr returns the address of the string value or nil if n.IsNull()
func (*NonEmptyString) Scan ¶
func (n *NonEmptyString) Scan(value any) error
Scan implements the database/sql.Scanner interface.
func (*NonEmptyString) Set ¶
func (n *NonEmptyString) Set(s string)
Set the passed string as NonEmptyString. Passing an empty string will be interpreted as setting NULL.
func (*NonEmptyString) SetNull ¶
func (n *NonEmptyString) SetNull()
SetNull sets the string to its null value
func (NonEmptyString) StringOr ¶
func (n NonEmptyString) StringOr(nullString string) string
StringOr returns the string value of n or the passed nullString if n.IsNull()
func (NonEmptyString) TrimSpace ¶
func (n NonEmptyString) TrimSpace() NonEmptyString
TrimSpace returns the string with all white-space characters trimmed from beginning and end. A potentially resulting empty string will be interpreted as null.
func (*NonEmptyString) UnmarshalText ¶
func (n *NonEmptyString) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface
type NullBoolArray ¶
NullBoolArray implements the sql.Scanner and driver.Valuer interfaces for a slice of sql.NullBool. A nil slice is mapped to the SQL NULL value, and a non nil zero length slice to an empty SQL array '{}'.
func (NullBoolArray) Bools ¶
func (a NullBoolArray) Bools() []bool
Bools returns all NullBoolArray elements as []bool with NULL elements set to false.
func (NullBoolArray) IsNull ¶
func (a NullBoolArray) IsNull() bool
IsNull returns true if a is nil. IsNull implements the Nullable interface.
func (*NullBoolArray) Scan ¶
func (a *NullBoolArray) Scan(src any) error
Scan implements the sql.Scanner interface
func (NullBoolArray) String ¶
func (a NullBoolArray) String() string
String implements the fmt.Stringer interface.
type NullFloatArray ¶
type NullFloatArray []sql.NullFloat64
NullFloatArray implements the sql.Scanner and driver.Valuer interfaces for a slice of sql.NullFloat64. A nil slice is mapped to the SQL NULL value, and a non nil zero length slice to an empty SQL array '{}'.
func (NullFloatArray) Floats ¶
func (a NullFloatArray) Floats() []float64
Floats returns all NullFloatArray elements as []float64 with NULL elements set to 0.
func (NullFloatArray) IsNull ¶
func (a NullFloatArray) IsNull() bool
IsNull returns true if a is nil. IsNull implements the Nullable interface.
func (*NullFloatArray) Scan ¶
func (a *NullFloatArray) Scan(src any) error
Scan implements the sql.Scanner interface
func (NullFloatArray) String ¶
func (a NullFloatArray) String() string
String implements the fmt.Stringer interface.
type NullIntArray ¶
NullIntArray implements the sql.Scanner and driver.Valuer interfaces for a slice of sql.NullInt64. A nil slice is mapped to the SQL NULL value, and a non nil zero length slice to an empty SQL array '{}'.
func (NullIntArray) Ints ¶
func (a NullIntArray) Ints() []int64
Ints returns all NullIntArray elements as []int64 with NULL elements set to 0.
func (NullIntArray) IsNull ¶
func (a NullIntArray) IsNull() bool
IsNull returns true if a is nil. IsNull implements the Nullable interface.
func (*NullIntArray) Scan ¶
func (a *NullIntArray) Scan(src any) error
Scan implements the sql.Scanner interface
func (NullIntArray) String ¶
func (a NullIntArray) String() string
String implements the fmt.Stringer interface.
type Nullable ¶
type Nullable interface { // IsNull returns true if the implementing value is considered null. IsNull() bool }
Nullable is an interface with an IsNull method
type StringArray ¶
type StringArray = pq.StringArray
StringArray implements the sql.Scanner and driver.Valuer interfaces for a slice of strings. A nil slice is mapped to the SQL NULL value, and a non nil zero length slice to an empty SQL array '{}'.
type Time ¶
Time represents a time.Time where the zero time instant (which is the empty default value of the type) is interpreted as SQL NULL and JSON null. It implements the sql.Scanner and driver.Valuer interfaces and also json.Marshaler and json.Unmarshaler. It assumes that zero time instant is never used in any real life application so it's free to be used as magical value for representing NULL. IsNull uses time.Time.IsZero internally.
var TimeNull Time
TimeNull is a null Time value.
Note: use Time.IsNull or IsNotNull to check for null instead of comparing a Time with TimeNull because Time.IsNull uses time.Time.IsZero internally which can return true for times that are not the empty time.Time{} default value.
func TimeFromPtr ¶
TimeFromPtr returns a nullable.Time from a time.Time pointer with nil interpreted as null.
func TimeParse ¶
TimeParse parses a time value with the provided layout using time.Parse(layout, value) except for when value is on of "", "null", "NULL", then a null/zero time and no error are returned.
func TimeParseInLocation ¶
TimeParseInLocation parses a time value with the provided layout and location using time.ParseInLocation(layout, value, loc) except for when value is on of "", "null", "NULL", then a null/zero time and no error are returned.
func (Time) AddDate ¶
AddDate returns the nullable time corresponding to adding the given number of years, months, and days to t. For example, AddDate(-1, 2, 3) applied to January 1, 2011 returns March 4, 2010.
AddDate normalizes its result in the same way that Date does, so, for example, adding one month to October 31 yields December 1, the normalized form for November 31.
Returns null if n is null.
func (Time) AppendFormat ¶
AppendFormat the time to b using time.Time.AppendFormat or b if n is null.
func (Time) Equal ¶
Equal reports whether n and o represent the same time instant or both are null. Two times can be equal even if they are in different locations. For example, 6:00 +0200 and 4:00 UTC are Equal. See the documentation on the Time type for the pitfalls of using == with Time values; most code should use Equal instead.
func (Time) Format ¶
Format the time using time.Time.Format or return and empty string if n is null.
func (Time) Get ¶
Get returns the non nullable time.Time value or panics if the Time is null. Note: check with IsNull before using Get!
func (Time) GetOr ¶
GetOr returns the non nullable time.Time value or the passed defaultTime if the Time is null.
func (Time) IsNotNull ¶
IsNotNull returns true if the Time is not null. Uses time.Time.IsZero internally.
func (Time) IsNull ¶
IsNull returns true if the Time is null. Uses time.Time.IsZero internally. IsNull implements the Nullable interface.
func (Time) MarshalJSON ¶
MarshalJSON implements encoding/json.Marshaler
func (Time) MarshalText ¶
MarshalText implements the encoding.TextMarshaler interface. The time is formatted in RFC 3339 format, with sub-second precision added if present. "NULL" is returned as text if the time is null.
func (Time) PrettyPrint ¶
PrettyPrint implements the pretty.Printable interface
func (*Time) UnmarshalJSON ¶
UnarshalJSON implements encoding/json.Unmarshaler. Interprets []byte(nil), []byte(""), []byte("null") as null.
func (*Time) UnmarshalText ¶
UnmarshalText implements the encoding.TextUnmarshaler interface. The time is expected to be in RFC 3339 format. Empty text, "null", or "NULL" will set the time to null.
type TrimmedString ¶
type TrimmedString string
TrimmedString is a string type where the empty trimmed string value is interpreted as SQL NULL and JSON null by implementing the sql.Scanner and driver.Valuer interfaces and also json.Marshaler and json.Unmarshaler.
Note that this type can't hold a not null empty string, because it will interpret it as null SQL or JSON value.
const TrimmedStringNull TrimmedString = ""
TrimmedStringNull is the NULL value "" for TrimmedString
func JoinTrimmedStrings ¶
func JoinTrimmedStrings(separator string, strs ...TrimmedString) TrimmedString
JoinTrimmedStrings joins only those strings that are not empty/null with the passed separator between them.
func TrimmedStringFrom ¶
func TrimmedStringFrom(str string) TrimmedString
TrimmedStringFrom trims the passed str and returns it as TrimmedString An empty trimmed string will be interpreted as null value.
func TrimmedStringFromError ¶
func TrimmedStringFromError(err error) TrimmedString
TrimmedStringFromError converts an error to a TrimmedString interpreting a nil error as null value "" or else using err.Error() as value.
func TrimmedStringFromPtr ¶
func TrimmedStringFromPtr(ptr *string) TrimmedString
TrimmedStringFromPtr converts a string pointer to a TrimmedString interpreting nil as null value "". An empty trimmed string will be interpreted as null value.
func TrimmedStringf ¶
func TrimmedStringf(format string, a ...any) TrimmedString
TrimmedStringf formats a string using fmt.Sprintf and returns it as TrimmedString. An empty trimmed string will be interpreted as null value.
func (TrimmedString) Contains ¶
func (s TrimmedString) Contains(substr string) bool
Contains reports whether substr is within s.
func (TrimmedString) ContainsAny ¶
func (s TrimmedString) ContainsAny(chars string) bool
ContainsAny reports whether any Unicode code points in chars are within s.
func (TrimmedString) ContainsRune ¶
func (s TrimmedString) ContainsRune(r rune) bool
ContainsRune reports whether the Unicode code point r is within s.
func (TrimmedString) Get ¶
func (s TrimmedString) Get() string
Get returns the non nullable string value or panics if the TrimmedString is null. Note: check with IsNull before using Get!
func (TrimmedString) HasPrefix ¶
func (s TrimmedString) HasPrefix(prefix string) bool
HasPrefix tests whether the TrimmedString begins with prefix.
func (TrimmedString) HasSuffix ¶
func (s TrimmedString) HasSuffix(suffix string) bool
HasSuffix tests whether the TrimmedString ends with suffix.
func (TrimmedString) IsNotNull ¶
func (s TrimmedString) IsNotNull() bool
IsNotNull returns true if the string is not empty.
func (TrimmedString) IsNull ¶
func (s TrimmedString) IsNull() bool
IsNull returns true if the string is empty.
IsNull implements the Nullable interface.
func (TrimmedString) MarshalJSON ¶
func (s TrimmedString) MarshalJSON() ([]byte, error)
MarshalJSON implements encoding/json.Marshaler by returning the JSON null value for an empty (null) string.
func (TrimmedString) MarshalText ¶
func (s TrimmedString) MarshalText() ([]byte, error)
UnmarshalText implements the encoding.TextMarshaler interface
func (TrimmedString) MarshalXML ¶
func (s TrimmedString) MarshalXML(e *xml.Encoder, start xml.StartElement) error
func (TrimmedString) Ptr ¶
func (s TrimmedString) Ptr() *string
Ptr returns the address of the string value or nil if n.IsNull()
func (TrimmedString) ReplaceAll ¶
func (s TrimmedString) ReplaceAll(old, new string) TrimmedString
ReplaceAll returns a copy of the TrimmedString with all non-overlapping instances of old replaced by new. If old is empty, it matches at the beginning of the string and after each UTF-8 sequence, yielding up to k+1 replacements for a k-rune string.
func (*TrimmedString) Scan ¶
func (s *TrimmedString) Scan(value any) error
Scan implements the database/sql.Scanner interface.
func (*TrimmedString) Set ¶
func (s *TrimmedString) Set(str string)
Set the passed string as TrimmedString. Passing an empty trimmed string will be interpreted as setting NULL.
func (*TrimmedString) SetNull ¶
func (s *TrimmedString) SetNull()
SetNull sets the string to its null value
func (TrimmedString) Split ¶
func (s TrimmedString) Split(sep string) []TrimmedString
Split slices s into all substrings separated by sep and returns a slice of the substrings between those separators.
If s does not contain sep and sep is not empty, Split returns a slice of length 1 whose only element is s.
If sep is empty, Split splits after each UTF-8 sequence. If both s and sep are empty, Split returns an empty slice.
It is equivalent to SplitN with a count of -1.
To split around the first instance of a separator, see Cut.
func (TrimmedString) String ¶
func (s TrimmedString) String() string
String implements the fmt.Stringer interface by returning a trimmed string that might be empty in case of the NULL value or an underlying string consisting only of whitespace.
func (TrimmedString) StringOr ¶
func (s TrimmedString) StringOr(nullString string) string
StringOr returns the trimmed string value of n or the passed nullString if n.IsNull()
func (TrimmedString) ToLower ¶
func (s TrimmedString) ToLower() TrimmedString
ToLower returns s with all Unicode letters mapped to their lower case.
func (TrimmedString) ToUpper ¶
func (s TrimmedString) ToUpper() TrimmedString
ToUpper returns s with all Unicode letters mapped to their upper case.
func (TrimmedString) ToValidUTF8 ¶
func (s TrimmedString) ToValidUTF8(replacement string) TrimmedString
ToValidUTF8 returns a copy of the TrimmedString with each run of invalid UTF-8 byte sequences replaced by the replacement string, which may be empty.
func (TrimmedString) TrimPrefix ¶
func (s TrimmedString) TrimPrefix(prefix string) TrimmedString
TrimPrefix returns s without the provided leading prefix string. If the TrimmedString doesn't start with prefix, s is returned unchanged.
func (TrimmedString) TrimSuffix ¶
func (s TrimmedString) TrimSuffix(suffix string) TrimmedString
TrimSuffix returns s without the provided trailing suffix string. If the TrimmedString doesn't end with suffix, s is returned unchanged.
func (*TrimmedString) UnmarshalJSON ¶
func (s *TrimmedString) UnmarshalJSON(j []byte) error
UnmarshalJSON implements encoding/json.Unmarshaler.
func (*TrimmedString) UnmarshalText ¶
func (s *TrimmedString) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface
func (*TrimmedString) UnmarshalXML ¶
func (s *TrimmedString) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error