Vendor dependencies

This commit is contained in:
Alexander Neumann
2016-12-28 21:41:04 +01:00
committed by Zlatko Čalušić
parent 2f0a16d8b7
commit 6054876201
541 changed files with 139974 additions and 0 deletions

38
vendor/goji.io/pattern/pattern_test.go generated vendored Normal file
View File

@@ -0,0 +1,38 @@
package pattern
import (
"context"
"net/http"
"testing"
)
type boolPattern bool
func (b boolPattern) Match(ctx context.Context, r *http.Request) context.Context {
if b {
return ctx
}
return nil
}
type prefixPattern string
func (p prefixPattern) Match(ctx context.Context, r *http.Request) context.Context {
return ctx
}
func (p prefixPattern) PathPrefix() string {
return string(p)
}
func TestPathRoundTrip(t *testing.T) {
t.Parallel()
ctx := SetPath(context.Background(), "hi")
if path := Path(ctx); path != "hi" {
t.Errorf("expected hi, got %q", path)
}
if path := Path(context.Background()); path != "" {
t.Errorf("expected empty path, got %q", path)
}
}