Documentation
¶
Overview ¶
Package tests Created by Teocci. Author: teocci@yandex.com on 2021-Aug-29
Index ¶
- Constants
- Variables
- type A
- type B
- type CSVMarshaler
- type CSVTextMarshaler
- type CSVTextUnmarshaler
- type CSVUnmarshaler
- type Embedded1
- type Embedded10
- type Embedded11
- type Embedded12
- type Embedded13
- type Embedded14
- type Embedded15
- type Embedded16
- type Embedded17
- type Embedded18
- type Embedded2
- type Embedded3
- type Embedded4
- type Embedded5
- type Embedded6
- type Embedded7
- type Embedded8
- type Embedded9
- type EmbeddedPtrUnmarshalers
- type EmbeddedUnmarshalers
- type Enum
- type EnumType
- type Float
- type Inline
- type Inline2
- type Inline3
- type Inline4
- type Inline5
- type Inline6
- type Inline7
- type Inline8
- type IntStruct
- type InvalidType
- type PtrRecCSVMarshaler
- type PtrRecTextMarshaler
- type TagPriority
- type TextMarshaler
- type TextUnmarshaler
- type TypeA
- type TypeB
- type TypeC
- type TypeD
- type TypeE
- type TypeF
- type TypeG
- type TypeH
- type TypeI
- type TypeJ
- type TypeK
- type TypeL
- type TypeM
- type TypeWithInvalidField
- type UnexportedEmbedded
- type UnexportedEmbeddedPtr
- type Unmarshalers
- type ValueRecTextUnmarshaler
- type ValueRecUnmarshaler
Constants ¶
View Source
const ( EnumDefault = iota EnumFirst EnumSecond )
Variables ¶
View Source
var Binary = []byte("binary-data")
View Source
var BinaryLarge = bytes.Repeat([]byte("1"), 128*1024)
View Source
var EncodedBinary = base64.StdEncoding.EncodeToString(Binary)
View Source
var EncodedBinaryLarge = base64.StdEncoding.EncodeToString(BinaryLarge)
View Source
var Error = errors.New("error")
View Source
var Int = 10
View Source
var PString = &String
View Source
var String = "string"
View Source
var TypeISlice []TypeI
Functions ¶
This section is empty.
Types ¶
type CSVMarshaler ¶
type CSVMarshaler struct {
Err error
}
func (CSVMarshaler) MarshalCSV ¶
func (m CSVMarshaler) MarshalCSV() ([]byte, error)
type CSVTextMarshaler ¶
type CSVTextMarshaler struct { CSVMarshaler TextMarshaler }
type CSVTextUnmarshaler ¶
type CSVTextUnmarshaler struct {
String string `csv:"string"`
}
func (*CSVTextUnmarshaler) UnmarshalCSV ¶
func (t *CSVTextUnmarshaler) UnmarshalCSV(s []byte) error
func (*CSVTextUnmarshaler) UnmarshalText ¶
func (t *CSVTextUnmarshaler) UnmarshalText(text []byte) error
type CSVUnmarshaler ¶
type CSVUnmarshaler struct {
String string `csv:"string"`
}
func (*CSVUnmarshaler) UnmarshalCSV ¶
func (t *CSVUnmarshaler) UnmarshalCSV(s []byte) error
type Embedded10 ¶
type Embedded10 struct { Embedded11 Embedded12 Embedded13 }
type Embedded11 ¶
type Embedded11 struct {
Embedded6
}
type Embedded12 ¶
type Embedded12 struct {
Embedded6
}
type Embedded13 ¶
type Embedded13 struct {
Embedded8
}
type Embedded14 ¶
type Embedded14 Embedded3
func (*Embedded14) MarshalCSV ¶
func (e *Embedded14) MarshalCSV() ([]byte, error)
type Embedded15 ¶
type Embedded15 Embedded3
func (*Embedded15) MarshalText ¶
func (e *Embedded15) MarshalText() ([]byte, error)
type Embedded16 ¶
type Embedded17 ¶
type Embedded17 struct {
*Embedded18
}
type Embedded18 ¶
type EmbeddedPtrUnmarshalers ¶
type EmbeddedPtrUnmarshalers struct { *CSVUnmarshaler `csv:"csv"` *TextUnmarshaler `csv:"text"` *CSVTextUnmarshaler `csv:"csv-text"` }
type EmbeddedUnmarshalers ¶
type EmbeddedUnmarshalers struct { CSVUnmarshaler `csv:"csv"` TextUnmarshaler `csv:"text"` CSVTextUnmarshaler `csv:"csv-text"` }
type InvalidType ¶
type InvalidType struct {
String struct{}
}
type PtrRecCSVMarshaler ¶
type PtrRecCSVMarshaler int
func (*PtrRecCSVMarshaler) CSV ¶
func (m *PtrRecCSVMarshaler) CSV() ([]byte, error)
func (*PtrRecCSVMarshaler) MarshalCSV ¶
func (m *PtrRecCSVMarshaler) MarshalCSV() ([]byte, error)
type PtrRecTextMarshaler ¶
type PtrRecTextMarshaler int
func (*PtrRecTextMarshaler) MarshalText ¶
func (m *PtrRecTextMarshaler) MarshalText() ([]byte, error)
type TagPriority ¶
type TextMarshaler ¶
type TextMarshaler struct {
Err error
}
func (TextMarshaler) MarshalText ¶
func (m TextMarshaler) MarshalText() ([]byte, error)
type TextUnmarshaler ¶
type TextUnmarshaler struct {
String string `csv:"string"`
}
func (*TextUnmarshaler) UnmarshalText ¶
func (t *TextUnmarshaler) UnmarshalText(text []byte) error
type TypeF ¶
type TypeF struct { Int int `csv:"int" custom:"int"` Pint *int `csv:"pint" custom:"pint"` Int8 int8 `csv:"int8" custom:"int8"` Pint8 *int8 `csv:"pint8" custom:"pint8"` Int16 int16 `csv:"int16" custom:"int16"` Pint16 *int16 `csv:"pint16" custom:"pint16"` Int32 int32 `csv:"int32" custom:"int32"` Pint32 *int32 `csv:"pint32" custom:"pint32"` Int64 int64 `csv:"int64" custom:"int64"` Pint64 *int64 `csv:"pint64" custom:"pint64"` UInt uint `csv:"uint" custom:"uint"` Puint *uint `csv:"puint" custom:"puint"` Uint8 uint8 `csv:"uint8" custom:"uint8"` Puint8 *uint8 `csv:"puint8" custom:"puint8"` Uint16 uint16 `csv:"uint16" custom:"uint16"` Puint16 *uint16 `csv:"puint16" custom:"puint16"` Uint32 uint32 `csv:"uint32" custom:"uint32"` Puint32 *uint32 `csv:"puint32" custom:"puint32"` Uint64 uint64 `csv:"uint64" custom:"uint64"` Puint64 *uint64 `csv:"puint64" custom:"puint64"` Float32 float32 `csv:"float32" custom:"float32"` Pfloat32 *float32 `csv:"pfloat32" custom:"pfloat32"` Float64 float64 `csv:"float64" custom:"float64"` Pfloat64 *float64 `csv:"pfloat64" custom:"pfloat64"` String string `csv:"string" custom:"string"` PString *string `csv:"pstring" custom:"pstring"` Bool bool `csv:"bool" custom:"bool"` Pbool *bool `csv:"pbool" custom:"pbool"` V interface{} `csv:"interface" custom:"interface"` Pv *interface{} `csv:"pinterface" custom:"pinterface"` Binary []byte `csv:"binary" custom:"binary"` PBinary *[]byte `csv:"pbinary" custom:"pbinary"` }
type TypeH ¶
type TypeH struct { Int int `csv:"int,omitempty"` Int8 int8 `csv:"int8,omitempty"` Int16 int16 `csv:"int16,omitempty"` Int32 int32 `csv:"int32,omitempty"` Int64 int64 `csv:"int64,omitempty"` UInt uint `csv:"uint,omitempty"` Uint8 uint8 `csv:"uint8,omitempty"` Uint16 uint16 `csv:"uint16,omitempty"` Uint32 uint32 `csv:"uint32,omitempty"` Uint64 uint64 `csv:"uint64,omitempty"` Float32 float32 `csv:"float32,omitempty"` Float64 float64 `csv:"float64,omitempty"` String string `csv:"string,omitempty"` Bool bool `csv:"bool,omitempty"` V interface{} `csv:"interface,omitempty"` }
type TypeJ ¶
type TypeJ struct { String string `csv:"STR" json:"string"` Int string `csv:"int" json:"-"` Embedded16 Float string `csv:"float"` }
type TypeM ¶
type TypeM struct {
*TextMarshaler `csv:"text"`
}
type TypeWithInvalidField ¶
type TypeWithInvalidField struct {
String TypeI `csv:"string"`
}
type UnexportedEmbedded ¶
type UnexportedEmbedded struct {
// contains filtered or unexported fields
}
type UnexportedEmbeddedPtr ¶
type UnexportedEmbeddedPtr struct {
// contains filtered or unexported fields
}
type Unmarshalers ¶
type Unmarshalers struct { CSVUnmarshaler CSVUnmarshaler `csv:"csv"` PCSVUnmarshaler *CSVUnmarshaler `csv:"pcsv"` TextUnmarshaler TextUnmarshaler `csv:"text"` PTextUnmarshaler *TextUnmarshaler `csv:"ptext"` CSVTextUnmarshaler CSVTextUnmarshaler `csv:"csv-text"` PCSVTextUnmarshaler *CSVTextUnmarshaler `csv:"pcsv-text"` }
type ValueRecTextUnmarshaler ¶
type ValueRecTextUnmarshaler struct {
S *string
}
func (ValueRecTextUnmarshaler) UnmarshalText ¶
func (u ValueRecTextUnmarshaler) UnmarshalText(text []byte) error
type ValueRecUnmarshaler ¶
type ValueRecUnmarshaler struct {
S *string
}
func (ValueRecUnmarshaler) Scan ¶
func (u ValueRecUnmarshaler) Scan(data []byte) error
func (ValueRecUnmarshaler) UnmarshalCSV ¶
func (u ValueRecUnmarshaler) UnmarshalCSV(data []byte) error
Click to show internal directories.
Click to hide internal directories.