testutil

package
v0.0.0-...-20dc6fc Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustNewDevelopmentDB

func MustNewDevelopmentDB() (ddlDB *sqlx.DB, teardown func() error)

MustNewDevelopmentDB creates a new development DB. It also returns a function to teardown it after the test.

func MustNewDevelopmentSugaredLogger

func MustNewDevelopmentSugaredLogger() *zap.SugaredLogger

MustNewDevelopmentSugaredLogger returns a development sugared logger.

func RandomString

func RandomString(n int) string

RandomString generates a random string with given length. Notice: this function uses a pseudo random algorithm, only for use in test.

Types

This section is empty.

Jump to

Keyboard shortcuts

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