Documentation ¶
Index ¶
- func CheckStringCount(str string, maxLen int) bool
- func ConvertToString(input interface{}) (string, error)
- func GetBufferFromReadCloser(r io.ReadCloser) ([]byte, error)
- func GetMySQLDsn(username, password, server, port, db, parameter string) string
- func GetPostgresDsn(user, password, host, port, dbname, parameter string) string
- func GetStringCount(str string) int
- func GetStringFromReadCloser(r io.ReadCloser) (string, error)
- func SliceUTF8(str string, pos int) string
- func SliceUTF8AddString(str string, pos int, addString string) string
- func TransactionGorm(db *gorm.DB, f func(db *gorm.DB) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckStringCount ¶
CheckStringCount checks if the specified string length has been exceeded.
func ConvertToString ¶
ConvertToString converts a basic type to a string type.
func GetBufferFromReadCloser ¶
func GetBufferFromReadCloser(r io.ReadCloser) ([]byte, error)
GetBufferFromReadCloser gets buffer
func GetMySQLDsn ¶
GetMySQLDsn creates a MySQL DSN string. about DSN document. https://github.com/go-sql-driver/mysql#dsn-data-source-name
func GetPostgresDsn ¶
GetPostgresDsn creates a Postgres DSN string.
func GetStringCount ¶
GetStringCount gets the number of characters in a person's view.
func GetStringFromReadCloser ¶
func GetStringFromReadCloser(r io.ReadCloser) (string, error)
GetStringFromReadCloser gets string
func SliceUTF8 ¶
SliceUTF8 gets the characters from the beginning to the specified position, in UTF-8-based characters.
func SliceUTF8AddString ¶
SliceUTF8AddString gets the characters from the beginning to the specified position, in UTF-8-based characters.
Types ¶
This section is empty.