tcase

package
v0.0.0-...-3cd2f5a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeNone   Type = 0
	TypeEncode      = 1
	TypeDecode      = 2
	TypeBoth        = 3
)

Variables

View Source
var ErrMissingDesc = fmt.Errorf("missing desc field")

Functions

func GetFiles

func GetFiles(dir string) (filenames []string, err error)

func SprintBinary

func SprintBinary(bytes []byte, prefix string) (out string)

Types

type C

type C struct {
	Desc        string
	BOM         binary.ByteOrder
	Skip        Type
	Expected    interface{}
	DecodeError string
	EncodeError string
	Bytes       []byte
}

func Parse

func Parse(r io.Reader, filename string) ([]C, error)

func ParseFile

func ParseFile(filename string) ([]C, error)

func (C) DoesErrorMatch

func (c C) DoesErrorMatch(t Type, e error) bool

func (C) ErrorFor

func (c C) ErrorFor(t Type) string

func (C) HasErrorFor

func (c C) HasErrorFor(t Type) bool

type Type

type Type uint8

func (Type) Is

func (ot Type) Is(t Type) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL