handler

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatTemplateNames

func FormatTemplateNames(templateNames []string) []string

FormatTemplateNames formats the given template names to ensure that they are valid for the gitignore.io API.

It returns a slice of strings containing the formatted template names.

func HandleTemplateNames

func HandleTemplateNames(templateNames, availableTemplates []string) ([]string, error)

HandleTemplateNames is a convenience function that formats and validates template names to ensure that they are valid for the gitignore.io API.

It returns a slice of strings containing the formatted template names or an error if any of these template names are invalid.

See FormatTemplateNames and ValidateTemplateNames for more details.

func ValidateTemplateNames

func ValidateTemplateNames(templateNames, availableTemplates []string) error

ValidateTemplateNames checks whether the given template names are provided by the gitignore.io API.

It returns an error if any of the template names are invalid.

Types

This section is empty.

Jump to

Keyboard shortcuts

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