An open API service indexing awesome lists of open source software.

https://github.com/mchirico/go_test

Simple Go Test
https://github.com/mchirico/go_test

go golang tdd tdd-kata testing

Last synced: over 1 year ago
JSON representation

Simple Go Test

Awesome Lists containing this project

README

          

[![Build Status](https://travis-ci.org/mchirico/go_test.svg?branch=master)](https://travis-ci.org/mchirico/go_test)
[![Go Report Card](https://goreportcard.com/badge/github.com/mchirico/go_test)](https://goreportcard.com/report/github.com/mchirico/go_test)
[![codecov](https://codecov.io/gh/mchirico/go_test/branch/master/graph/badge.svg)](https://codecov.io/gh/mchirico/go_test)
[![Maintainability](https://api.codeclimate.com/v1/badges/437d440d9cf5fbe592a6/maintainability)](https://codeclimate.com/github/mchirico/go_test/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/437d440d9cf5fbe592a6/test_coverage)](https://codeclimate.com/github/mchirico/go_test/test_coverage)

## Testing in Go

Testing main exit status err, based
on flag input.

```bash
git checkout tags/v1.1

```

```bash
# Install
go get github.com/golang/mock/gomock
go get github.com/golang/mock/mockgen

# If you want, you can build mockgen in the current directory

go build github.com/golang/mock/mockgen
```

```bash
mockgen net/http Get

```

```bash
mockgen -destination=./mocks/mock_stuff.go -package=mocks database/sql/driver Conn,Driver

```