tech: adds/removes in vendor folder according to dep 0.4.0.
This commit is contained in:
-37
@@ -1,37 +0,0 @@
|
||||
# This Makefile pulls the latest oglematchers (with dependencies),
|
||||
# rewrites the imports to match this location,
|
||||
# and ensures that all the tests pass.
|
||||
# BTW, things used from oglematchers: Contains, Equals, DeepEquals, GreaterThan, LessThan, GreaterOrEqual, LessOrEqual
|
||||
|
||||
test:
|
||||
go test github.com/smartystreets/assertions/...
|
||||
|
||||
update: clear clone rewrite trim
|
||||
|
||||
clear:
|
||||
rm -rf ogle*
|
||||
rm -rf reqtrace
|
||||
rm -rf go-render
|
||||
|
||||
clone:
|
||||
git clone https://github.com/jacobsa/oglematchers.git && rm -rf oglematchers/.git
|
||||
git clone https://github.com/luci/go-render.git && rm -rf go-render/.git
|
||||
|
||||
rewrite:
|
||||
grep -rl --exclude Makefile 'github.com/jacobsa' . | xargs sed -i '' 's#github.com/jacobsa#github.com/smartystreets/assertions/internal#g'
|
||||
|
||||
trim:
|
||||
git checkout oglematchers/contains.go # This file diverged at 6acd0337
|
||||
rm oglematchers/*_test.go
|
||||
rm oglematchers/any.go
|
||||
rm oglematchers/all_of.go
|
||||
rm oglematchers/elements_are.go
|
||||
rm oglematchers/error.go
|
||||
rm oglematchers/has_same_type_as.go
|
||||
rm oglematchers/has_substr.go
|
||||
rm oglematchers/identical_to.go
|
||||
rm oglematchers/matches_regexp.go
|
||||
rm oglematchers/new_matcher.go
|
||||
rm oglematchers/panics.go
|
||||
rm oglematchers/pointee.go
|
||||
rm go-render/render/*_test.go
|
||||
-78
@@ -1,78 +0,0 @@
|
||||
go-render: A verbose recursive Go type-to-string conversion library.
|
||||
====================================================================
|
||||
|
||||
[](https://godoc.org/github.com/luci/go-render)
|
||||
[](https://travis-ci.org/luci/go-render)
|
||||
|
||||
This is not an official Google product.
|
||||
|
||||
## Overview
|
||||
|
||||
The *render* package implements a more verbose form of the standard Go string
|
||||
formatter, `fmt.Sprintf("%#v", value)`, adding:
|
||||
- Pointer recursion. Normally, Go stops at the first pointer and prints its
|
||||
address. The *render* package will recurse and continue to render pointer
|
||||
values.
|
||||
- Recursion loop detection. Recursion is nice, but if a recursion path detects
|
||||
a loop, *render* will note this and move on.
|
||||
- Custom type name rendering.
|
||||
- Deterministic key sorting for `string`- and `int`-keyed maps.
|
||||
- Testing!
|
||||
|
||||
Call `render.Render` and pass it an `interface{}`.
|
||||
|
||||
For example:
|
||||
|
||||
```Go
|
||||
type customType int
|
||||
type testStruct struct {
|
||||
S string
|
||||
V *map[string]int
|
||||
I interface{}
|
||||
}
|
||||
|
||||
a := testStruct{
|
||||
S: "hello",
|
||||
V: &map[string]int{"foo": 0, "bar": 1},
|
||||
I: customType(42),
|
||||
}
|
||||
|
||||
fmt.Println("Render test:")
|
||||
fmt.Printf("fmt.Printf: %#v\n", a)))
|
||||
fmt.Printf("render.Render: %s\n", Render(a))
|
||||
```
|
||||
|
||||
Yields:
|
||||
```
|
||||
fmt.Printf: render.testStruct{S:"hello", V:(*map[string]int)(0x600dd065), I:42}
|
||||
render.Render: render.testStruct{S:"hello", V:(*map[string]int){"bar":1, "foo":0}, I:render.customType(42)}
|
||||
```
|
||||
|
||||
This is not intended to be a high-performance library, but it's not terrible
|
||||
either.
|
||||
|
||||
Contributing
|
||||
------------
|
||||
|
||||
* Sign the [Google CLA](https://cla.developers.google.com/clas).
|
||||
* Make sure your `user.email` and `user.name` are configured in `git config`.
|
||||
* Install the [pcg](https://github.com/maruel/pre-commit-go) git hook:
|
||||
`go get -u github.com/maruel/pre-commit-go/cmd/... && pcg`
|
||||
|
||||
Run the following to setup the code review tool and create your first review:
|
||||
|
||||
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $HOME/src/depot_tools
|
||||
export PATH="$PATH:$HOME/src/depot_tools"
|
||||
cd $GOROOT/github.com/luci/go-render
|
||||
git checkout -b work origin/master
|
||||
|
||||
# hack hack
|
||||
|
||||
git commit -a -m "This is awesome\nR=joe@example.com"
|
||||
# This will ask for your Google Account credentials.
|
||||
git cl upload -s
|
||||
# Wait for LGTM over email.
|
||||
# Check the commit queue box in codereview website.
|
||||
# Wait for the change to be tested and landed automatically.
|
||||
|
||||
Use `git cl help` and `git cl help <cmd>` for more details.
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
# Copyright 2015 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
# Watchlist Rules
|
||||
# Refer: http://dev.chromium.org/developers/contributing-code/watchlists
|
||||
|
||||
{
|
||||
|
||||
'WATCHLIST_DEFINITIONS': {
|
||||
'all': {
|
||||
'filepath': '.+',
|
||||
},
|
||||
},
|
||||
|
||||
'WATCHLISTS': {
|
||||
'all': [
|
||||
# Add yourself here to get explicitly spammed.
|
||||
'maruel@chromium.org',
|
||||
'tandrii+luci-go@chromium.org',
|
||||
'todd@cloudera.com',
|
||||
'andrew.wang@cloudera.com',
|
||||
],
|
||||
},
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
*.6
|
||||
6.out
|
||||
_obj/
|
||||
_test/
|
||||
_testmain.go
|
||||
-58
@@ -1,58 +0,0 @@
|
||||
[](https://godoc.org/github.com/smartystreets/assertions/internal/oglematchers)
|
||||
|
||||
`oglematchers` is a package for the Go programming language containing a set of
|
||||
matchers, useful in a testing or mocking framework, inspired by and mostly
|
||||
compatible with [Google Test][googletest] for C++ and
|
||||
[Google JS Test][google-js-test]. The package is used by the
|
||||
[ogletest][ogletest] testing framework and [oglemock][oglemock] mocking
|
||||
framework, which may be more directly useful to you, but can be generically used
|
||||
elsewhere as well.
|
||||
|
||||
A "matcher" is simply an object with a `Matches` method defining a set of golang
|
||||
values matched by the matcher, and a `Description` method describing that set.
|
||||
For example, here are some matchers:
|
||||
|
||||
```go
|
||||
// Numbers
|
||||
Equals(17.13)
|
||||
LessThan(19)
|
||||
|
||||
// Strings
|
||||
Equals("taco")
|
||||
HasSubstr("burrito")
|
||||
MatchesRegex("t.*o")
|
||||
|
||||
// Combining matchers
|
||||
AnyOf(LessThan(17), GreaterThan(19))
|
||||
```
|
||||
|
||||
There are lots more; see [here][reference] for a reference. You can also add
|
||||
your own simply by implementing the `oglematchers.Matcher` interface.
|
||||
|
||||
|
||||
Installation
|
||||
------------
|
||||
|
||||
First, make sure you have installed Go 1.0.2 or newer. See
|
||||
[here][golang-install] for instructions.
|
||||
|
||||
Use the following command to install `oglematchers` and keep it up to date:
|
||||
|
||||
go get -u github.com/smartystreets/assertions/internal/oglematchers
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
See [here][reference] for documentation. Alternatively, you can install the
|
||||
package and then use `godoc`:
|
||||
|
||||
godoc github.com/smartystreets/assertions/internal/oglematchers
|
||||
|
||||
|
||||
[reference]: http://godoc.org/github.com/smartystreets/assertions/internal/oglematchers
|
||||
[golang-install]: http://golang.org/doc/install.html
|
||||
[googletest]: http://code.google.com/p/googletest/
|
||||
[google-js-test]: http://code.google.com/p/google-js-test/
|
||||
[ogletest]: http://github.com/smartystreets/assertions/internal/ogletest
|
||||
[oglemock]: http://github.com/smartystreets/assertions/internal/oglemock
|
||||
Reference in New Issue
Block a user