many lint fixes and optimizations (#17)

* util/kubernetes: drop stale files
* debug/log/kubernetes: drop stale files
* util/scope: remove stale files
* util/mdns: drop stale files
* lint fixes

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-02-13 15:35:56 +03:00
committed by GitHub
parent abb9937787
commit 82248eb3b0
57 changed files with 246 additions and 5690 deletions

View File

@@ -30,12 +30,8 @@ func (c *noopCodec) ReadBody(conn io.Reader, b interface{}) error {
}
switch v := b.(type) {
case string:
v = string(buf)
case *string:
*v = string(buf)
case []byte:
v = buf
case *[]byte:
*v = buf
case *Frame:
@@ -112,15 +108,9 @@ func (c *noopCodec) Unmarshal(d []byte, v interface{}) error {
return nil
}
switch ve := v.(type) {
case string:
ve = string(d)
return nil
case *string:
*ve = string(d)
return nil
case []byte:
ve = d
return nil
case *[]byte:
*ve = d
return nil