all: Become a Go module (fixes #5148) (#5384)

* go mod init; rm -rf vendor

* tweak proto files and generation

* go mod vendor

* clean up build.go

* protobuf literals in tests

* downgrade gogo/protobuf
This commit is contained in:
Jakob Borg
2018-12-18 12:36:38 +01:00
committed by GitHub
parent 3cc8918eb4
commit 944ddcf768
1410 changed files with 66232 additions and 688356 deletions

1
vendor/github.com/d4l3k/messagediff/.coveralls.yml generated vendored Normal file
View File

@@ -0,0 +1 @@
repo_token: LWIe7rP7M3hBnAxpsMaZhrVBs2DSyhzoQ

24
vendor/github.com/d4l3k/messagediff/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,24 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# Folders
_obj
_test
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
*.test
*.prof

26
vendor/github.com/d4l3k/messagediff/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,26 @@
language: go
os:
- linux
go:
- 1
- 1.3
- 1.4
- 1.5
- 1.6
- 1.7.x
- 1.8.x
- tip
before_install:
- if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
- go get github.com/axw/gocov/gocov
- go get github.com/modocache/gover
- go get github.com/mattn/goveralls
script:
- go test -v -coverprofile=example.coverprofile ./example
- go test -v -coverprofile=main.coverprofile
- $HOME/gopath/bin/gover
- $HOME/gopath/bin/goveralls -service=travis-ci -coverprofile=gover.coverprofile

14
vendor/github.com/d4l3k/messagediff/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,14 @@
## nightly
* Added support for ignoring fields.
## v1.1.0
* Added support for recursive data structures.
* Fixed bug with embedded fixed length arrays in structs.
* Added `example/` directory.
* Minor test bug fixes for future go versions.
* Added change log.
## v1.0.0
Initial tagged release release.

90
vendor/github.com/d4l3k/messagediff/README.md generated vendored Normal file
View File

@@ -0,0 +1,90 @@
# messagediff [![Build Status](https://travis-ci.org/d4l3k/messagediff.svg?branch=master)](https://travis-ci.org/d4l3k/messagediff) [![Coverage Status](https://coveralls.io/repos/github/d4l3k/messagediff/badge.svg?branch=master)](https://coveralls.io/github/d4l3k/messagediff?branch=master) [![GoDoc](https://godoc.org/github.com/d4l3k/messagediff?status.svg)](https://godoc.org/github.com/d4l3k/messagediff)
A library for doing diffs of arbitrary Golang structs.
If the unsafe package is available messagediff will diff unexported fields in
addition to exported fields. This is primarily used for testing purposes as it
allows for providing informative error messages.
Optionally, fields in structs can be tagged as `testdiff:"ignore"` to make
messagediff skip it when doing the comparison.
## Example Usage
In a normal file:
```go
package main
import "gopkg.in/d4l3k/messagediff.v1"
type someStruct struct {
A, b int
C []int
}
func main() {
a := someStruct{1, 2, []int{1}}
b := someStruct{1, 3, []int{1, 2}}
diff, equal := messagediff.PrettyDiff(a, b)
/*
diff =
`added: .C[1] = 2
modified: .b = 3`
equal = false
*/
}
```
In a test:
```go
import "gopkg.in/d4l3k/messagediff.v1"
...
type someStruct struct {
A, b int
C []int
}
func TestSomething(t *testing.T) {
want := someStruct{1, 2, []int{1}}
got := someStruct{1, 3, []int{1, 2}}
if diff, equal := messagediff.PrettyDiff(want, got); !equal {
t.Errorf("Something() = %#v\n%s", got, diff)
}
}
```
To ignore a field in a struct, just annotate it with testdiff:"ignore" like
this:
```go
package main
import "gopkg.in/d4l3k/messagediff.v1"
type someStruct struct {
A int
B int `testdiff:"ignore"`
}
func main() {
a := someStruct{1, 2}
b := someStruct{1, 3}
diff, equal := messagediff.PrettyDiff(a, b)
/*
equal = true
diff = ""
*/
}
```
See the `DeepDiff` function for using the diff results programmatically.
## License
Copyright (c) 2015 [Tristan Rice](https://fn.lc) <rice@fn.lc>
messagediff is licensed under the MIT license. See the LICENSE file for more information.
bypass.go and bypasssafe.go are borrowed from
[go-spew](https://github.com/davecgh/go-spew) and have a seperate copyright
notice.

View File

@@ -1 +0,0 @@
package examples