util

package
v0.0.0-...-4c4b7df Latest Latest
Warning

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

Go to latest
Published: May 7, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Md5base64

func Md5base64(str string) string

Returns the base 64 MD5 of given string.

func ParseMySQLTimestamp

func ParseMySQLTimestamp(timestamp string) (time.Time, error)

func Sha256base64

func Sha256base64(str string) string

Returns the base 64 SHA256 of given string.

func Trim

func Trim(str string) string

Removes white space from the beginning and end of a string, including spaces, tabs and new lines.

Types

type OpError

type OpError struct {
	Code int
	Msg  string
}

Custom error type with error code and message.

func (OpError) Error

func (e OpError) Error() string

type RowScanner

type RowScanner interface {
	Scan(...interface{}) error
}

Interface to treat sql.Row and sql.Rows as the same, when parsing results.

Jump to

Keyboard shortcuts

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