name

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package name provides methods to verify naming style and format naming style See the method IsNamingValid, FormatFilename

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatFilename

func FormatFilename(filename string, style NamingStyle) string

FormatFilename converts the filename string to the target naming style by calling method of stringx

Types

type NamingStyle

type NamingStyle = string

NamingStyle the type of string

const (
	// NamingLower defines the lower spell case
	NamingLower NamingStyle = "lower"
	// NamingCamel defines the camel spell case
	NamingCamel NamingStyle = "camel"
	// NamingSnake defines the snake spell case
	NamingSnake NamingStyle = "snake"
)

func IsNamingValid

func IsNamingValid(namingStyle string) (NamingStyle, bool)

IsNamingValid validates whether the namingStyle is valid or not,return namingStyle and true if it is valid, or else return empty string and false, and it is a valid value even namingStyle is empty string

Jump to

Keyboard shortcuts

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