utils

package
v0.0.0-...-b13d3a1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2018 License: Zlib Imports: 2 Imported by: 0

Documentation

Overview

Package utils contains some internal tools we use in macaw.

Index

Constants

This section is empty.

Variables

View Source
var (

	// LogFatal to log and exit. Replace for variable so we can change in the test
	LogFatal = log.Fatal
	// LogFatalf to log with format and exit. Replace for variable so we can change in the test
	LogFatalf = log.Fatalf
)

Functions

func SetupLog

func SetupLog(t *testing.T)

SetupLog will replace the log function for testing

func TeardownLog

func TeardownLog()

TeardownLog will return the original log function

Types

type MockSystem

type MockSystem struct {
	MockFunc func()
}

MockSystem is a system used for test

func (*MockSystem) Init

func (m *MockSystem) Init()

Init mock

func (*MockSystem) Update

func (m *MockSystem) Update()

Update executes a function if it was declared

Jump to

Keyboard shortcuts

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