util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileOpener

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

func NewFileOpener

func NewFileOpener(path string, flag int, perm os.FileMode) *FileOpener

func (*FileOpener) Name

func (o *FileOpener) Name() string

func (*FileOpener) Open

func (o *FileOpener) Open() (io.ReadWriteCloser, error)

type Mode

type Mode lexer.Mode

func (*Mode) Set

func (m *Mode) Set(s string) error

func (*Mode) String

func (m *Mode) String() string

type Opener

type Opener interface {
	Name() string
	Open() (io.ReadWriteCloser, error)
}

type RWCOpener

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

func NewRWCOpener

func NewRWCOpener(name string, rwc io.ReadWriteCloser) *RWCOpener

func (*RWCOpener) Name

func (rwc *RWCOpener) Name() string

func (*RWCOpener) Open

func (rwc *RWCOpener) Open() (io.ReadWriteCloser, error)

type Type

type Type int
const (
	Yaml Type = iota
	Json
	Msgpack
	Cbor
)

func (*Type) Set

func (t *Type) Set(s string) error

func (*Type) String

func (t *Type) String() string

Jump to

Keyboard shortcuts

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