Repository: kubernetes/klog (go)

Issue:
InfoS uses `%#s` for errors instead of `%q`
/kind bug
When working on https://github.com/kubernetes/kubernetes/pull/91591 we noticed that 
```
klog.V(2).InfoS("NODE DENY", "err", err)
```
was serialized to 
```
I0603 09:57:29.759232   53238 node_authorizer.go:209] "NODE DENY" err=&errors.errorString{s:"node \"node2\" cannot get secret ns1/node1-only, no relationship to this object was found in the node authorizer graph"}
```
instead of 
```
I0603 09:57:29.759232   53238 node_authorizer.go:209] "NODE DENY" err="node \"node2\" cannot get secret ns1/node1-only, no relationship to this object was found in the node authorizer graph"
```

Possibly it was fixed by https://github.com/kubernetes/klog/issues/156 
If so we should  add tests for Error objects.


Pull request description:
Add tests for error in InfoS
<!--  Thanks for sending a pull request!  Here are some tips for you:
1. If this is your first time, read our contributor guidelines https://git.k8s.io/community/contributors/guide/pull-requests.md#the-pull-request-submit-process and developer guide https://git.k8s.io/community/contributors/devel/development.md#development-guide
2. If you want *faster* PR reviews, read how: https://git.k8s.io/community/contributors/guide/pull-requests.md#best-practices-for-faster-reviews
3. Follow the instructions for writing a release note: https://git.k8s.io/community/contributors/guide/release-notes.md
4. If the PR is unfinished, see how to mark it: https://git.k8s.io/community/contributors/guide/pull-requests.md#marking-unfinished-pull-requests
5. If this PR changes image versions, please title this PR "Bump <image name> from x.x.x to y.y.y."
-->

**What this PR does / why we need it**:

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes #158 



**Release note**:
```release-note
NONE
```


Patch:
diff --git a/klog.go b/klog.go
index ac3fbb0..d339ea8 100644
--- a/klog.go
+++ b/klog.go
@@ -802,7 +802,7 @@ func kvListFormat(b *bytes.Buffer, keysAndValues ...interface{}) {
 		b.WriteByte(' ')
 
 		switch v.(type) {
-		case string:
+		case string, error:
 			b.WriteString(fmt.Sprintf("%s=%q", k, v))
 		default:
 			if _, ok := v.(fmt.Stringer); ok {


Test patch:
diff --git a/klog_test.go b/klog_test.go
index 40a0ca3..f46ba91 100644
--- a/klog_test.go
+++ b/klog_test.go
@@ -18,6 +18,7 @@ package klog
 
 import (
 	"bytes"
+	"errors"
 	"flag"
 	"fmt"
 	"io/ioutil"
@@ -792,6 +793,16 @@ func TestInfoS(t *testing.T) {
 			format:     "I0102 15:04:05.067890    1234 klog_test.go:%d] \"test\" replicaNum=20\n",
 			keysValues: []interface{}{"replicaNum", 20},
 		},
+		{
+			msg:        "test",
+			format:     "I0102 15:04:05.067890    1234 klog_test.go:%d] \"test\" err=\"test error\"\n",
+			keysValues: []interface{}{"err", errors.New("test error")},
+		},
+		{
+			msg:        "test",
+			format:     "I0102 15:04:05.067890    1234 klog_test.go:%d] \"test\" err=\"test error\"\n",
+			keysValues: []interface{}{"err", errors.New("test error")},
+		},
 	}
 
 	for _, data := range testDataInfo {