mirror of https://github.com/k3s-io/k3s
Merge pull request #46928 from CaoShuFeng/audit_unused_function
Automatic merge from submit-queue remove unused function and variable from audit backend auditStringSlice is not used here anymore. sink variable is also not used. **Release note**: ``` NONE ``` Fixes: #47114pull/6/head
commit
1033dae18e
|
@ -19,23 +19,20 @@ package log
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"strings"
|
|
||||||
|
|
||||||
auditinternal "k8s.io/apiserver/pkg/apis/audit"
|
auditinternal "k8s.io/apiserver/pkg/apis/audit"
|
||||||
"k8s.io/apiserver/pkg/audit"
|
"k8s.io/apiserver/pkg/audit"
|
||||||
)
|
)
|
||||||
|
|
||||||
type backend struct {
|
type backend struct {
|
||||||
out io.Writer
|
out io.Writer
|
||||||
sink chan *auditinternal.Event
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var _ audit.Backend = &backend{}
|
var _ audit.Backend = &backend{}
|
||||||
|
|
||||||
func NewBackend(out io.Writer) *backend {
|
func NewBackend(out io.Writer) *backend {
|
||||||
return &backend{
|
return &backend{
|
||||||
out: out,
|
out: out,
|
||||||
sink: make(chan *auditinternal.Event, 100),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,11 +52,3 @@ func (b *backend) logEvent(ev *auditinternal.Event) {
|
||||||
func (b *backend) Run(stopCh <-chan struct{}) error {
|
func (b *backend) Run(stopCh <-chan struct{}) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func auditStringSlice(inList []string) string {
|
|
||||||
quotedElements := make([]string, len(inList))
|
|
||||||
for i, in := range inList {
|
|
||||||
quotedElements[i] = fmt.Sprintf("%q", in)
|
|
||||||
}
|
|
||||||
return strings.Join(quotedElements, ",")
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue