handler

package
v0.0.0-...-6da9eb2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatOrder

func FormatOrder(order []string) []string

FormatOrder takes a slice of strings representing an order, normalizes the strings to lowercase, and removes any duplicates. It returns a new slice that contains only unique, lowercased strings.

func ValidateOrder

func ValidateOrder(order, availableTemplates []string) error

ValidateOrder iterates over each item in the order slice and checks if it is present in the availableTemplates slice. If an item is not found, it returns an error with a message indicating the invalid template.

Types

This section is empty.

Jump to

Keyboard shortcuts

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