Documentation ¶
Index ¶
- func MarshalSchema(content any, format schema.SchemaFileFormat) ([]byte, error)
- func ReadFileFromPath(filePath string) ([]byte, error)
- func SliceUnorderedEqual[T cmp.Ordered](a []T, b []T) bool
- func SplitStringsAndTrimSpaces(input string, sep string) []string
- func StringSliceToConstantCase(inputs []string) string
- func StringSliceToPascalCase(inputs []string) string
- func StringSliceToSnakeCase(inputs []string) string
- func ToCamelCase(input string) string
- func ToConstantCase(input string) string
- func ToPascalCase(input string) string
- func ToSnakeCase(input string) string
- func WriteSchemaFile(outputPath string, content any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalSchema ¶
func MarshalSchema(content any, format schema.SchemaFileFormat) ([]byte, error)
MarshalSchema encodes the NDC REST schema to bytes
func ReadFileFromPath ¶
ReadFileFromPath read file content from either file path or URL
func SliceUnorderedEqual ¶
SliceUnorderedEqual compares if both slices are equal with unordered positions
func SplitStringsAndTrimSpaces ¶
SplitStrings wrap strings.Split with all leading and trailing white space removed
func StringSliceToConstantCase ¶
StringSliceToConstantCase convert a slice of string to PascalCase
func StringSliceToPascalCase ¶
StringSliceToPascalCase convert a slice of string to PascalCase
func StringSliceToSnakeCase ¶
StringSliceToSnakeCase convert a slice of string to snake_case
func ToConstantCase ¶
ToConstantCase converts string to CONSTANT_CASE
func ToPascalCase ¶
ToPascalCase convert a string to PascalCase
func WriteSchemaFile ¶
WriteSchemaFile writes the NDC REST schema to file
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.