msgfmt

package
v0.0.0-...-4aef51c Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: Apache-2.0, Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Formats = map[string]Format{
	"goTime": &GoTimeFormat{},
}

Functions

func Fprintf

func Fprintf(writer io.Writer, format string, kvObj ...interface{}) (int, error)

func Fprintln

func Fprintln(writer io.Writer, valuesObj ...interface{}) (int, error)

func Printf

func Printf(format string, kvObj ...interface{}) (int, error)

func Println

func Println(valuesObj ...interface{}) (int, error)

func Sprintf

func Sprintf(format string, kvObj ...interface{}) string

Types

type Format

type Format interface {
	FormatterOf(targetKey string, formatArgs []string, sample []interface{}) (Formatter, error)
}

type Formatter

type Formatter interface {
	Format(space []byte, kv []interface{}) []byte
}

func FormatterOf

func FormatterOf(format string, sample []interface{}) Formatter

type Formatters

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

func (Formatters) Append

func (formatters Formatters) Append(formatter Formatter) Formatters

func (Formatters) Format

func (formatters Formatters) Format(space []byte, kv []interface{}) []byte

type GoTimeFormat

type GoTimeFormat struct {
}

func (*GoTimeFormat) FormatterOf

func (format *GoTimeFormat) FormatterOf(targetKey string, formatArgs []string, sample []interface{}) (Formatter, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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