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 (
|
||||
"fmt"
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
auditinternal "k8s.io/apiserver/pkg/apis/audit"
|
||||
"k8s.io/apiserver/pkg/audit"
|
||||
)
|
||||
|
||||
type backend struct {
|
||||
out io.Writer
|
||||
sink chan *auditinternal.Event
|
||||
out io.Writer
|
||||
}
|
||||
|
||||
var _ audit.Backend = &backend{}
|
||||
|
||||
func NewBackend(out io.Writer) *backend {
|
||||
return &backend{
|
||||
out: out,
|
||||
sink: make(chan *auditinternal.Event, 100),
|
||||
out: out,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -55,11 +52,3 @@ func (b *backend) logEvent(ev *auditinternal.Event) {
|
|||
func (b *backend) Run(stopCh <-chan struct{}) error {
|
||||
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