aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Lehtonen <lars.lehtonen@gmail.com>2020-02-07 12:35:30 -0800
committerGitHub <noreply@github.com>2020-02-07 21:35:30 +0100
commit0754ceca5b0dc532cc11f7a6fe162dddcc2e7d4f (patch)
treef9b7ba80908006c6539c2e0ca17edda2bb0bfec2
parent11789aebb0537b5df551d0857fd0a920fae569a6 (diff)
downloadgitea-0754ceca5b0dc532cc11f7a6fe162dddcc2e7d4f.tar.gz
gitea-0754ceca5b0dc532cc11f7a6fe162dddcc2e7d4f.zip
modules/log: remove noop written variables (#10182)
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
-rw-r--r--modules/log/conn_test.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/modules/log/conn_test.go b/modules/log/conn_test.go
index cc3d758fa9..0f35f02a2d 100644
--- a/modules/log/conn_test.go
+++ b/modules/log/conn_test.go
@@ -27,8 +27,6 @@ func listenReadAndClose(t *testing.T, l net.Listener, expected string) {
}
func TestConnLogger(t *testing.T) {
- var written []byte
-
protocol := "tcp"
address := ":3099"
@@ -79,8 +77,6 @@ func TestConnLogger(t *testing.T) {
}()
wg.Wait()
- written = written[:0]
-
event.level = WARN
expected = fmt.Sprintf("%s%s %s:%d:%s [%c] %s\n", prefix, dateString, event.filename, event.line, event.caller, strings.ToUpper(event.level.String())[0], event.msg)
wg.Add(2)
@@ -156,8 +152,6 @@ func TestConnLoggerFailConnect(t *testing.T) {
}
func TestConnLoggerClose(t *testing.T) {
- var written []byte
-
protocol := "tcp"
address := ":3099"
@@ -217,8 +211,6 @@ func TestConnLoggerClose(t *testing.T) {
assert.Equal(t, level, connLogger.Level)
assert.Equal(t, level, logger.GetLevel())
- written = written[:0]
-
event.level = WARN
expected = fmt.Sprintf("%s%s %s:%d:%s [%c] %s\n", prefix, dateString, event.filename, event.line, event.caller, strings.ToUpper(event.level.String())[0], event.msg)
wg.Add(2)