Merge pull request #305 from iamqizhao/master
rename Type()
diff --git a/credentials/credentials.go b/credentials/credentials.go
index 8189ca7..217ef82 100644
--- a/credentials/credentials.go
+++ b/credentials/credentials.go
@@ -80,7 +80,7 @@
// AuthInfo defines the common interface for the auth information the users are interested in.
type AuthInfo interface {
- Type() string
+ AuthType() string
}
type authInfoKey struct{}
@@ -118,7 +118,7 @@
state tls.ConnectionState
}
-func (t TLSInfo) Type() string {
+func (t TLSInfo) AuthType() string {
return "tls"
}
diff --git a/test/end2end_test.go b/test/end2end_test.go
index d2368f8..35b40ec 100644
--- a/test/end2end_test.go
+++ b/test/end2end_test.go
@@ -120,7 +120,7 @@
var authType string
switch info := authInfo.(type) {
case credentials.TLSInfo:
- authType = info.Type()
+ authType = info.AuthType()
default:
grpclog.Fatalf("Unknown AuthInfo type")
}