Use vndr instead of godep.
Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
12
vendor/github.com/golang/mock/AUTHORS
generated
vendored
12
vendor/github.com/golang/mock/AUTHORS
generated
vendored
@@ -1,12 +0,0 @@
|
||||
# This is the official list of GoMock authors for copyright purposes.
|
||||
# This file is distinct from the CONTRIBUTORS files.
|
||||
# See the latter for an explanation.
|
||||
|
||||
# Names should be added to this file as
|
||||
# Name or Organization <email address>
|
||||
# The email address is not required for organizations.
|
||||
|
||||
# Please keep the list sorted.
|
||||
|
||||
Alex Reece <awreece@gmail.com>
|
||||
Google Inc.
|
||||
37
vendor/github.com/golang/mock/CONTRIBUTORS
generated
vendored
37
vendor/github.com/golang/mock/CONTRIBUTORS
generated
vendored
@@ -1,37 +0,0 @@
|
||||
# This is the official list of people who can contribute (and typically
|
||||
# have contributed) code to the gomock repository.
|
||||
# The AUTHORS file lists the copyright holders; this file
|
||||
# lists people. For example, Google employees are listed here
|
||||
# but not in AUTHORS, because Google holds the copyright.
|
||||
#
|
||||
# The submission process automatically checks to make sure
|
||||
# that people submitting code are listed in this file (by email address).
|
||||
#
|
||||
# Names should be added to this file only after verifying that
|
||||
# the individual or the individual's organization has agreed to
|
||||
# the appropriate Contributor License Agreement, found here:
|
||||
#
|
||||
# http://code.google.com/legal/individual-cla-v1.0.html
|
||||
# http://code.google.com/legal/corporate-cla-v1.0.html
|
||||
#
|
||||
# The agreement for individuals can be filled out on the web.
|
||||
#
|
||||
# When adding J Random Contributor's name to this file,
|
||||
# either J's name or J's organization's name should be
|
||||
# added to the AUTHORS file, depending on whether the
|
||||
# individual or corporate CLA was used.
|
||||
|
||||
# Names should be added to this file like so:
|
||||
# Name <email address>
|
||||
#
|
||||
# An entry with two email addresses specifies that the
|
||||
# first address should be used in the submit logs and
|
||||
# that the second address should be recognized as the
|
||||
# same person when interacting with Rietveld.
|
||||
|
||||
# Please keep the list sorted.
|
||||
|
||||
Aaron Jacobs <jacobsa@google.com> <aaronjjacobs@gmail.com>
|
||||
Alex Reece <awreece@gmail.com>
|
||||
David Symonds <dsymonds@golang.org>
|
||||
Ryan Barrett <ryanb@google.com>
|
||||
81
vendor/github.com/golang/mock/README.md
generated
vendored
Normal file
81
vendor/github.com/golang/mock/README.md
generated
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
GoMock is a mocking framework for the [Go programming language][golang]. It
|
||||
integrates well with Go's built-in `testing` package, but can be used in other
|
||||
contexts too.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
Once you have [installed Go][golang-install], run these commands
|
||||
to install the `gomock` package and the `mockgen` tool:
|
||||
|
||||
go get github.com/golang/mock/gomock
|
||||
go get github.com/golang/mock/mockgen
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
After installing, you can use `go doc` to get documentation:
|
||||
|
||||
go doc github.com/golang/mock/gomock
|
||||
|
||||
Alternatively, there is an online reference for the package hosted on GoPkgDoc
|
||||
[here][gomock-ref].
|
||||
|
||||
|
||||
Running mockgen
|
||||
---------------
|
||||
|
||||
`mockgen` has two modes of operation: source and reflect.
|
||||
Source mode generates mock interfaces from a source file.
|
||||
It is enabled by using the -source flag. Other flags that
|
||||
may be useful in this mode are -imports and -aux_files.
|
||||
|
||||
Example:
|
||||
|
||||
mockgen -source=foo.go [other options]
|
||||
|
||||
Reflect mode generates mock interfaces by building a program
|
||||
that uses reflection to understand interfaces. It is enabled
|
||||
by passing two non-flag arguments: an import path, and a
|
||||
comma-separated list of symbols.
|
||||
|
||||
Example:
|
||||
|
||||
mockgen database/sql/driver Conn,Driver
|
||||
|
||||
The `mockgen` command is used to generate source code for a mock
|
||||
class given a Go source file containing interfaces to be mocked.
|
||||
It supports the following flags:
|
||||
|
||||
* `-source`: A file containing interfaces to be mocked.
|
||||
|
||||
* `-destination`: A file to which to write the resulting source code. If you
|
||||
don't set this, the code is printed to standard output.
|
||||
|
||||
* `-package`: The package to use for the resulting mock class
|
||||
source code. If you don't set this, the package name is `mock_` concatenated
|
||||
with the package of the input file.
|
||||
|
||||
* `-imports`: A list of explicit imports that should be used in the resulting
|
||||
source code, specified as a comma-separated list of elements of the form
|
||||
`foo=bar/baz`, where `bar/baz` is the package being imported and `foo` is
|
||||
the identifier to use for the package in the generated source code.
|
||||
|
||||
* `-aux_files`: A list of additional files that should be consulted to
|
||||
resolve e.g. embedded interfaces defined in a different file. This is
|
||||
specified as a comma-separated list of elements of the form
|
||||
`foo=bar/baz.go`, where `bar/baz.go` is the source file and `foo` is the
|
||||
package name of that file used by the -source file.
|
||||
|
||||
For an example of the use of `mockgen`, see the `sample/` directory. In simple
|
||||
cases, you will need only the `-source` flag.
|
||||
|
||||
|
||||
TODO: Brief overview of how to create mock objects and set up expectations, and
|
||||
an example.
|
||||
|
||||
[golang]: http://golang.org/
|
||||
[golang-install]: http://golang.org/doc/install.html#releases
|
||||
[gomock-ref]: http://godoc.org/github.com/golang/mock/gomock
|
||||
Reference in New Issue
Block a user