messages

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLIMessages_BaseDirDescription                          messageKey = "CLIMessages_BaseDirDescription"
	CLIMessages_DisableTelemetryDescription                 messageKey = "CLIMessages_DisableTelemetryDescription"
	CLIMessages_HelpDescription                             messageKey = "CLIMessages_HelpDescription"
	CLIMessages_InitializeMATLABOnStartupDescription        messageKey = "CLIMessages_InitializeMATLABOnStartupDescription"
	CLIMessages_InternalUseDescription                      messageKey = "CLIMessages_InternalUseDescription"
	CLIMessages_LogLevelDescription                         messageKey = "CLIMessages_LogLevelDescription"
	CLIMessages_PreferredLocalMATLABRootDescription         messageKey = "CLIMessages_PreferredLocalMATLABRootDescription"
	CLIMessages_PreferredMATLABStartingDirectoryDescription messageKey = "CLIMessages_PreferredMATLABStartingDirectoryDescription"
	CLIMessages_UseSingleMATLABSessionDescription           messageKey = "CLIMessages_UseSingleMATLABSessionDescription"
	CLIMessages_VersionDescription                          messageKey = "CLIMessages_VersionDescription"
	StartupErrors_BadFlag                                   messageKey = "StartupErrors_BadFlag"
	StartupErrors_BadSyntax                                 messageKey = "StartupErrors_BadSyntax"
	StartupErrors_BadValue                                  messageKey = "StartupErrors_BadValue"
	StartupErrors_GenericInitializeFailure                  messageKey = "StartupErrors_GenericInitializeFailure"
	StartupErrors_InvalidLogLevel                           messageKey = "StartupErrors_InvalidLogLevel"
	StartupErrors_MissingValue                              messageKey = "StartupErrors_MissingValue"
	StartupErrors_ParseFailed                               messageKey = "StartupErrors_ParseFailed"
)
View Source
const (
	Locale_en_US localeKey = "en_US"
)

Variables

This section is empty.

Functions

func FromError

func FromError(catalog LocaleSpecificCatalog, err Error) string

FromError retrieves the message corresponding to the passed error from the message catalog. The holes in the message are filled from the error attributes.

func FromErrorMultiLocale

func FromErrorMultiLocale(err Error, locale LocaleKey) string

func FromGeneralError

func FromGeneralError(catalog LocaleSpecificCatalog, err error) (string, bool)

func FromGeneralErrorMultiLocale

func FromGeneralErrorMultiLocale(err error, locale LocaleKey) (string, bool)

func LocaleFromString

func LocaleFromString(locale string) (localeKey, bool)

Types

type Catalog

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

Catalog provides access to the messages for a specific locale.

func NewCatalog

func NewCatalog(key LocaleKey) *Catalog

NewCatalog creates a Catalog corresponding to a specific locale.

func (*Catalog) Get

func (c *Catalog) Get(key MessageKey) string

Get returns the message corresponding to the provided key.

type Error

type Error interface {
	Error() string
	// contains filtered or unexported methods
}

type LocaleKey

type LocaleKey interface {
	// contains filtered or unexported methods
}

LocaleKey is a specific type to signify message catalog locales.

type LocaleSpecificCatalog

type LocaleSpecificCatalog interface {
	Get(MessageKey) string
}

type MessageKey

type MessageKey interface {
	// contains filtered or unexported methods
}

MessageKey is a specific type to signify message catalog keys.

type MultiLocaleCatalog

type MultiLocaleCatalog struct{}

MultiLocaleCatalog provides access to messages across all locales.

func NewMultiLocaleCatalog

func NewMultiLocaleCatalog() *MultiLocaleCatalog

NewMultiLocaleCatalog creates a new multi-locale catalog.

func (*MultiLocaleCatalog) Get

func (c *MultiLocaleCatalog) Get(key MessageKey, locale LocaleKey) string

Get returns the message corresponding to the provided key and locale.

type StartupErrors_BadFlag_Error

type StartupErrors_BadFlag_Error struct {
	Attr0 string
	Attr1 string
	Attr2 string
}

StartupErrors_BadFlag_Error defines an error corresponding to the "StartupErrors_BadFlag" message catalog message

func New_StartupErrors_BadFlag_Error

func New_StartupErrors_BadFlag_Error(
	attr0 string,
	attr1 string,
	attr2 string,
) *StartupErrors_BadFlag_Error

New_StartupErrors_BadFlag_Error makes a new StartupErrors_BadFlag_Error error.

func (*StartupErrors_BadFlag_Error) Error

Error makes StartupErrors_BadFlag_Error satisfy the error interface.

type StartupErrors_BadSyntax_Error

type StartupErrors_BadSyntax_Error struct {
	Attr0 string
	Attr1 string
	Attr2 string
}

StartupErrors_BadSyntax_Error defines an error corresponding to the "StartupErrors_BadSyntax" message catalog message

func New_StartupErrors_BadSyntax_Error

func New_StartupErrors_BadSyntax_Error(
	attr0 string,
	attr1 string,
	attr2 string,
) *StartupErrors_BadSyntax_Error

New_StartupErrors_BadSyntax_Error makes a new StartupErrors_BadSyntax_Error error.

func (*StartupErrors_BadSyntax_Error) Error

Error makes StartupErrors_BadSyntax_Error satisfy the error interface.

type StartupErrors_BadValue_Error

type StartupErrors_BadValue_Error struct {
	Attr0 string
	Attr1 string
}

StartupErrors_BadValue_Error defines an error corresponding to the "StartupErrors_BadValue" message catalog message

func New_StartupErrors_BadValue_Error

func New_StartupErrors_BadValue_Error(
	attr0 string,
	attr1 string,
) *StartupErrors_BadValue_Error

New_StartupErrors_BadValue_Error makes a new StartupErrors_BadValue_Error error.

func (*StartupErrors_BadValue_Error) Error

Error makes StartupErrors_BadValue_Error satisfy the error interface.

type StartupErrors_InvalidLogLevel_Error

type StartupErrors_InvalidLogLevel_Error struct {
	Attr0 string
}

StartupErrors_InvalidLogLevel_Error defines an error corresponding to the "StartupErrors_InvalidLogLevel" message catalog message

func New_StartupErrors_InvalidLogLevel_Error

func New_StartupErrors_InvalidLogLevel_Error(
	attr0 string,
) *StartupErrors_InvalidLogLevel_Error

New_StartupErrors_InvalidLogLevel_Error makes a new StartupErrors_InvalidLogLevel_Error error.

func (*StartupErrors_InvalidLogLevel_Error) Error

Error makes StartupErrors_InvalidLogLevel_Error satisfy the error interface.

type StartupErrors_MissingValue_Error

type StartupErrors_MissingValue_Error struct {
	Attr0 string
}

StartupErrors_MissingValue_Error defines an error corresponding to the "StartupErrors_MissingValue" message catalog message

func New_StartupErrors_MissingValue_Error

func New_StartupErrors_MissingValue_Error(
	attr0 string,
) *StartupErrors_MissingValue_Error

New_StartupErrors_MissingValue_Error makes a new StartupErrors_MissingValue_Error error.

func (*StartupErrors_MissingValue_Error) Error

Error makes StartupErrors_MissingValue_Error satisfy the error interface.

type StartupErrors_ParseFailed_Error

type StartupErrors_ParseFailed_Error struct {
	Attr0 string
	Attr1 string
}

StartupErrors_ParseFailed_Error defines an error corresponding to the "StartupErrors_ParseFailed" message catalog message

func New_StartupErrors_ParseFailed_Error

func New_StartupErrors_ParseFailed_Error(
	attr0 string,
	attr1 string,
) *StartupErrors_ParseFailed_Error

New_StartupErrors_ParseFailed_Error makes a new StartupErrors_ParseFailed_Error error.

func (*StartupErrors_ParseFailed_Error) Error

Error makes StartupErrors_ParseFailed_Error satisfy the error interface.

Jump to

Keyboard shortcuts

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