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
Click to show internal directories.
Click to hide internal directories.