format

package
v1.3.1-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2022 License: MIT Imports: 5 Imported by: 54

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNamingFormat = errors.New("unsupported format")

ErrNamingFormat defines an error for unknown format

Functions

func FileNamingFormat

func FileNamingFormat(format, content string) (string, error)

FileNamingFormat is used to format the file name. You can define the format style through the go and zero formatting characters. For example, you can define the snake format as go_zero, and the camel case format as goZero. You can even specify the split character, such as go#Zero, theoretically any combination can be used, but the prerequisite must meet the naming conventions of each operating system file name. Note: Formatting is based on snake or camel string

Types

This section is empty.

Jump to

Keyboard shortcuts

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