mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-19 23:03:08 +00:00
simplify testing
This commit is contained in:
1 parent
3582b9d869
commit
fc63f0432c
99 files changed
+726
-817
No files matched your search
@@ -5,12 +5,11 @@ import (
|
||||
|
||||
"github.com/v2ray/v2ray-core/common"
|
||||
"github.com/v2ray/v2ray-core/common/alloc"
|
||||
"github.com/v2ray/v2ray-core/common/serial"
|
||||
)
|
||||
|
||||
type LogEntry interface {
|
||||
common.Releasable
|
||||
serial.String
|
||||
fmt.Stringer
|
||||
}
|
||||
|
||||
type ErrorLog struct {
|
||||
@@ -37,7 +36,7 @@ func (this *ErrorLog) String() string {
|
||||
b.AppendString(typedVal)
|
||||
case *string:
|
||||
b.AppendString(*typedVal)
|
||||
case serial.String:
|
||||
case fmt.Stringer:
|
||||
b.AppendString(typedVal.String())
|
||||
case error:
|
||||
b.AppendString(typedVal.Error())
|
||||
@@ -49,10 +48,10 @@ func (this *ErrorLog) String() string {
|
||||
}
|
||||
|
||||
type AccessLog struct {
|
||||
From serial.String
|
||||
To serial.String
|
||||
From fmt.Stringer
|
||||
To fmt.Stringer
|
||||
Status string
|
||||
Reason serial.String
|
||||
Reason fmt.Stringer
|
||||
}
|
||||
|
||||
func (this *AccessLog) Release() {
|
||||
|
||||
Reference in new issue
Block a user