Upgrade server dependencies, manage them with govendor
This commit is contained in:
parent
ebee2746d6
commit
971278e7e5
1748 changed files with 196165 additions and 194500 deletions
21
vendor/github.com/matryer/resync/LICENSE
generated
vendored
Normal file
21
vendor/github.com/matryer/resync/LICENSE
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Mat Ryer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
4
vendor/github.com/matryer/resync/README.md
generated
vendored
4
vendor/github.com/matryer/resync/README.md
generated
vendored
|
@ -4,11 +4,13 @@
|
|||
|
||||
* See [sync.Once](http://golang.org/pkg/sync/#Once)
|
||||
|
||||
Rather than adding this project as a dependency, consider [dropping](https://github.com/matryer/drop) this file into your project.
|
||||
|
||||
## Example
|
||||
|
||||
The following example examines how `resync.Once` could be used in a HTTP server situation.
|
||||
|
||||
```
|
||||
```go
|
||||
// use it just like sync.Once
|
||||
var once resync.Once
|
||||
|
||||
|
|
35
vendor/github.com/matryer/resync/once_test.go
generated
vendored
35
vendor/github.com/matryer/resync/once_test.go
generated
vendored
|
@ -1,35 +0,0 @@
|
|||
package resync_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/cheekybits/is"
|
||||
"github.com/matryer/resync"
|
||||
)
|
||||
|
||||
func TestOnceReset(t *testing.T) {
|
||||
is := is.New(t)
|
||||
var calls int
|
||||
var c resync.Once
|
||||
c.Do(func() {
|
||||
calls++
|
||||
})
|
||||
c.Do(func() {
|
||||
calls++
|
||||
})
|
||||
c.Do(func() {
|
||||
calls++
|
||||
})
|
||||
is.Equal(calls, 1)
|
||||
c.Reset()
|
||||
c.Do(func() {
|
||||
calls++
|
||||
})
|
||||
c.Do(func() {
|
||||
calls++
|
||||
})
|
||||
c.Do(func() {
|
||||
calls++
|
||||
})
|
||||
is.Equal(calls, 2)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue