format

package
v1.7.11 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: GPL-3.0 Imports: 7 Imported by: 8

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