errors

package
v0.0.0-...-5365f31 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package errors handles localized errors.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalizedError

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

LocalizedError represents an error than could be translated to another language.

func NewLocalizedError

func NewLocalizedError(message string, args ...interface{}) *LocalizedError

NewLocalizedError returns a new LocalizedError.

func (LocalizedError) Error

func (l LocalizedError) Error() string

Error returns untranslated error message.

func (LocalizedError) Localize

func (l LocalizedError) Localize(translation *locale.Language) string

Localize returns the translated error message.

Jump to

Keyboard shortcuts

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