Documentation ¶
Index ¶
- func RecognizedNames() []string
- func RecognizedSupportedsNames() []string
- func UnrecognizedLanguageError(name string, options []string) *locale.LocalizedError
- type Executable
- type Language
- func (l Language) Executable() Executable
- func (l Language) Ext() string
- func (l Language) Header() string
- func (l Language) MarshalYAML() (interface{}, error)
- func (l *Language) Recognized() bool
- func (l Language) RecommendedVersion() string
- func (l Language) Requirement() string
- func (l *Language) Set(v string) error
- func (l Language) String() string
- func (l Language) TempPattern() string
- func (l Language) Text() string
- func (l *Language) Type() string
- func (l *Language) UnmarshalYAML(applyPayload func(interface{}) error) error
- func (l *Language) Validate() error
- type Supported
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecognizedNames ¶
func RecognizedNames() []string
RecognizedNames returns all language names that are supported.
func RecognizedSupportedsNames ¶
func RecognizedSupportedsNames() []string
RecognizedSupportedsNames returns all languages that are not "builtin" and also have a defined executable name.
func UnrecognizedLanguageError ¶
func UnrecognizedLanguageError(name string, options []string) *locale.LocalizedError
UnrecognizedLanguageError simplifies construction of LocalizedError for an unrecognized language.
Types ¶
type Executable ¶
type Executable struct {
// contains filtered or unexported fields
}
Executable contains details about an executable program used to interpret a Language.
func (Executable) Available ¶
func (e Executable) Available() bool
Available returns whether the executable is not "builtin" and also has a defined name.
func (Executable) CanUseThirdParty ¶
func (e Executable) CanUseThirdParty() bool
CanUseThirdParty expresses whether the executable is expected to be provided by the shell environment.
func (Executable) Filename ¶
func (e Executable) Filename() string
Filename returns the executables file's full name.
func (Executable) Name ¶
func (e Executable) Name() string
Name returns the executables file's name.
type Language ¶
type Language int
Language tracks the languages potentially used.
Language constants are provided for safety/reference.
func MakeByName ¶
MakeByName will retrieve a language by a given name after lower-casing.
func MakeByNameAndVersion ¶
MakeByNameAndVersion will retrieve a language by a given name and version.
func MakeByShell ¶
MakeByShell returns either bash or cmd based on whether the provided shell name contains "cmd". This should be taken to mean that bash is a sort of default.
func MakeByText ¶
MakeByText will retrieve a language by a given text
func (Language) Executable ¶
func (l Language) Executable() Executable
Executable provides details about the executable related to the Language.
func (Language) MarshalYAML ¶
MarshalYAML implements the go-yaml/yaml.Marshaler interface.
func (*Language) Recognized ¶
Recognized returns whether the language is a known useful value.
func (Language) RecommendedVersion ¶
RecommendedVersion returns the string representation of the recommended version.
func (Language) Requirement ¶
Requirement returns the platform-level string representation.
func (Language) TempPattern ¶
TempPattern returns the os.CreateTemp pattern to be used to form the temp file name.
func (*Language) UnmarshalYAML ¶
UnmarshalYAML implements the go-yaml/yaml.Unmarshaler interface.
type Supported ¶
type Supported struct {
Language
}
Supported tracks the languages potentially used for projects.
func RecognizedSupporteds ¶
func RecognizedSupporteds() []Supported
RecognizedSupporteds returns all languages that are not "builtin" and also have a defined executable name.
func (*Supported) Recognized ¶
Recognized returns whether the supported language is a known useful value.
func (*Supported) UnmarshalYAML ¶
UnmarshalYAML implements the go-yaml/yaml.Unmarshaler interface.