util

package
v0.0.0-...-110668f Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComponentName

func ComponentName(api *spec.ApiSpec) string

ComponentName returns component name for typescript

func Copy

func Copy(src, dst string) (int64, error)

Copy calls io.Copy if the source file and destination file exists

func IsLowerCase

func IsLowerCase(r rune) bool

IsLowerCase returns true if the rune in a-z

func IsUpperCase

func IsUpperCase(r rune) bool

IsUpperCase returns true if the rune in A-Z

func MaybeCreateFile

func MaybeCreateFile(dir, subdir, file string) (fp *os.File, created bool, err error)

MaybeCreateFile creates file if not exists

func RemoveComment

func RemoveComment(line string) string

RemoveComment filters comment content

func ToCamelCase

func ToCamelCase(s string) string

ToCamelCase returns a copy string by converting snake case into camel case

func ToLower

func ToLower(s string) string

ToLower returns a copy string by converting it into lower

func ToLowerCase

func ToLowerCase(r rune) rune

ToLowerCase converts rune into lower case

func ToSnakeCase

func ToSnakeCase(s string) string

ToSnakeCase returns a copy string by converting camel case into snake case

func ToUpper

func ToUpper(s string) string

ToUpper returns a copy string by converting it into upper

func ToUpperCase

func ToUpperCase(r rune) rune

ToUpperCase converts rune into upper case

func UnExport

func UnExport(text string) bool

UnExport converts the first letter into lower case

func UpperFirst

func UpperFirst(s string) string

UpperFirst converts s[0] into upper case

func WrapErr

func WrapErr(err error, message string) error

WrapErr wraps an error with message

func WriteIndent

func WriteIndent(writer io.Writer, indent int)

WriteIndent writes tab spaces

Types

This section is empty.

Jump to

Keyboard shortcuts

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