Documentation ¶
Index ¶
- Constants
- func CheckStringCount(str string, maxLen int) bool
- func ConvertJSTToUTC(t time.Time) time.Time
- func ConvertToString(input interface{}) (string, error)
- func ConvertUTCToJST(t time.Time) time.Time
- func GetBufferFromReadCloser(r io.ReadCloser) ([]byte, error)
- func GetDateFormatString(t time.Time, format string) string
- func GetDateTime(str, format string) (time.Time, 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 ¶
const ( DateFormatHyphenYearMonthDay = "2006-01-02" DateFormatHyphenYearMonthDayHourMinuteSecond = "2006-01-02 15:04:05" DateFormatHyphenMonthDayYear = "01-02-2006" DateFormatHyphenMonthDayYearHourMinuteSecond = "01-02-2006 15:04:05" DateFormatHyphenDayMonthYear = "02-01-2006" DateFormatHyphenDayMonthYearHourMinuteSecond = "02-01-2006 15:04:05" DateFormatHyphenMonthDay = "01-02" DateFormatHyphenDayMonth = "02-01" DateFormatSlashYearMonthDay = "2006/01/02" DateFormatSlashYearMonthDayHourMinuteSecond = "2006/01/02 15:04:05" DateFormatSlashMonthDayYear = "01/02/2006" DateFormatSlashMonthDayYearHourMinuteSecond = "01/02/2006 15:04:05" DateFormatSlashDayMonthYear = "02/01/2006" DateFormatSlashDayMonthYearHourMinuteSecond = "02/01/2006 15:04:05" DateFormatSlashMonthDay = "01/02" DateFormatSlashDayMonth = "02/01" DateFormatYear = "2006" DateFormatHourMinuteSecond = "15:04:05" DateConvertUTCToJSTOffset = 9 * 60 * 60 )
Variables ¶
This section is empty.
Functions ¶
func CheckStringCount ¶
CheckStringCount checks if the specified string length has been exceeded.
func ConvertJSTToUTC ¶ added in v0.0.19
ConvertJSTToUTC converts JST to UTC
func ConvertToString ¶
ConvertToString converts a basic type to a string type.
func ConvertUTCToJST ¶ added in v0.0.19
ConvertUTCToJST converts UTC to JST
func GetBufferFromReadCloser ¶
func GetBufferFromReadCloser(r io.ReadCloser) ([]byte, error)
GetBufferFromReadCloser gets buffer
func GetDateFormatString ¶ added in v0.0.19
GetDateFormatString gets format date string.
func GetDateTime ¶ added in v0.0.19
GetDateTime gets time.
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.