csv: h12.io/csv Index | Files | Directories

package csv

import "h12.io/csv"

Index

Package Files

encode.go expand.go field.go tag.go

func Marshal Uses

func Marshal(v interface{}) ([]byte, error)

type Encoder Uses

type Encoder struct {
    // contains filtered or unexported fields
}

func NewEncoder Uses

func NewEncoder(w io.Writer) *Encoder

func (*Encoder) Encode Uses

func (e *Encoder) Encode(value interface{}) error

func (*Encoder) EncodeHeader Uses

func (e *Encoder) EncodeHeader(value interface{}) error

func (*Encoder) Fields Uses

func (e *Encoder) Fields() Fields

func (*Encoder) SetDelimiter Uses

func (e *Encoder) SetDelimiter(delim rune) *Encoder

func (*Encoder) SetExpandPath Uses

func (e *Encoder) SetExpandPath(path ...string) *Encoder

func (*Encoder) SetLineBreak Uses

func (e *Encoder) SetLineBreak(lineBreak string) *Encoder

func (*Encoder) SetTagKey Uses

func (e *Encoder) SetTagKey(tagKey string) *Encoder

type Field Uses

type Field struct {
    Name  string
    Value string
    Tag   Tag
}

type Fields Uses

type Fields []Field

func (Fields) Len Uses

func (a Fields) Len() int

func (Fields) Less Uses

func (a Fields) Less(i, j int) bool

func (Fields) Names Uses

func (a Fields) Names() []string

func (Fields) Swap Uses

func (a Fields) Swap(i, j int)

func (Fields) Values Uses

func (a Fields) Values() []string

type Tag Uses

type Tag string

A StructTag is the tag string in a struct field.

By convention, tag strings are a concatenation of optionally space-separated key:"value" pairs. Each key is a non-empty string consisting of non-control characters other than space (U+0020 ' '), quote (U+0022 '"'), and colon (U+003A ':'). Each value is quoted using U+0022 '"' characters and Go string literal syntax.

func (Tag) Get Uses

func (tag Tag) Get(key string) string

Get returns the value associated with key in the tag string. If there is no such key in the tag, Get returns the empty string. If the tag does not have the conventional format, the value returned by Get is unspecified.

func (Tag) Has Uses

func (tag Tag) Has(key string) bool

type Tags Uses

type Tags []Tag

Directories

PathSynopsis
cmd

Package csv imports 9 packages (graph) and is imported by 2 packages. Updated 2018-05-06. Refresh now. Tools for package owners.