Linux id-dci-web1412.main-hosting.eu 5.14.0-611.20.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jan 14 06:35:04 EST 2026 x86_64
LiteSpeed
: 2a02:4780:6:1512:0:19fc:adf1:2 | : 216.73.216.85
Cant Read [ /etc/named.conf ]
8.1.34
u435990001
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
opt /
go /
pkg /
mod /
github.com /
go-kit /
log@v0.2.1 /
[ HOME SHELL ]
Name
Size
Permission
Action
.github
[ DIR ]
dr-xr-xr-x
level
[ DIR ]
dr-xr-xr-x
syslog
[ DIR ]
dr-xr-xr-x
term
[ DIR ]
dr-xr-xr-x
.gitignore
269
B
-r--r--r--
LICENSE
1.04
KB
-r--r--r--
README.md
5.19
KB
-r--r--r--
benchmark_test.go
443
B
-r--r--r--
concurrency_test.go
653
B
-r--r--r--
doc.go
5.23
KB
-r--r--r--
example_test.go
2.71
KB
-r--r--r--
go.mod
82
B
-r--r--r--
go.sum
173
B
-r--r--r--
json_logger.go
2.03
KB
-r--r--r--
json_logger_test.go
4.61
KB
-r--r--r--
log.go
6.32
KB
-r--r--r--
log_test.go
8.65
KB
-r--r--r--
logfmt_logger.go
1.34
KB
-r--r--r--
logfmt_logger_test.go
1.38
KB
-r--r--r--
nop_logger.go
206
B
-r--r--r--
nop_logger_test.go
502
B
-r--r--r--
staticcheck.conf
17
B
-r--r--r--
stdlib.go
4.16
KB
-r--r--r--
stdlib_test.go
9.26
KB
-r--r--r--
sync.go
3.18
KB
-r--r--r--
sync_test.go
1.99
KB
-r--r--r--
value.go
3.33
KB
-r--r--r--
value_test.go
3.84
KB
-r--r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : value_test.go
package log_test import ( "encoding" "fmt" "reflect" "testing" "time" "github.com/go-kit/log" ) func TestValueBinding(t *testing.T) { t.Parallel() var output []interface{} logger := log.Logger(log.LoggerFunc(func(keyvals ...interface{}) error { output = keyvals return nil })) start := time.Date(2015, time.April, 25, 0, 0, 0, 0, time.UTC) now := start mocktime := func() time.Time { now = now.Add(time.Second) return now } lc := log.With(logger, "ts", log.Timestamp(mocktime), "caller", log.DefaultCaller) lc.Log("foo", "bar") timestamp, ok := output[1].(time.Time) if !ok { t.Fatalf("want time.Time, have %T", output[1]) } if want, have := start.Add(time.Second), timestamp; want != have { t.Errorf("output[1]: want %v, have %v", want, have) } if want, have := "value_test.go:31", fmt.Sprint(output[3]); want != have { t.Errorf("output[3]: want %s, have %s", want, have) } // A second attempt to confirm the bindings are truly dynamic. lc.Log("foo", "bar") timestamp, ok = output[1].(time.Time) if !ok { t.Fatalf("want time.Time, have %T", output[1]) } if want, have := start.Add(2*time.Second), timestamp; want != have { t.Errorf("output[1]: want %v, have %v", want, have) } if want, have := "value_test.go:44", fmt.Sprint(output[3]); want != have { t.Errorf("output[3]: want %s, have %s", want, have) } } func TestValueBinding_loggingZeroKeyvals(t *testing.T) { t.Parallel() var output []interface{} logger := log.Logger(log.LoggerFunc(func(keyvals ...interface{}) error { output = keyvals return nil })) start := time.Date(2015, time.April, 25, 0, 0, 0, 0, time.UTC) now := start mocktime := func() time.Time { now = now.Add(time.Second) return now } logger = log.With(logger, "ts", log.Timestamp(mocktime)) logger.Log() timestamp, ok := output[1].(time.Time) if !ok { t.Fatalf("want time.Time, have %T", output[1]) } if want, have := start.Add(time.Second), timestamp; want != have { t.Errorf("output[1]: want %v, have %v", want, have) } // A second attempt to confirm the bindings are truly dynamic. logger.Log() timestamp, ok = output[1].(time.Time) if !ok { t.Fatalf("want time.Time, have %T", output[1]) } if want, have := start.Add(2*time.Second), timestamp; want != have { t.Errorf("output[1]: want %v, have %v", want, have) } } func TestTimestampFormat(t *testing.T) { t.Parallel() start := time.Date(2015, time.April, 25, 0, 0, 0, 0, time.UTC) now := start mocktime := func() time.Time { now = now.Add(time.Second) return now } tv := log.TimestampFormat(mocktime, time.RFC822) if want, have := now.Add(time.Second).Format(time.RFC822), fmt.Sprint(tv()); want != have { t.Errorf("wrong time format: want %v, have %v", want, have) } if want, have := now.Add(2*time.Second).Format(time.RFC822), fmt.Sprint(tv()); want != have { t.Errorf("wrong time format: want %v, have %v", want, have) } mustMarshal := func(v interface{}) []byte { b, err := v.(encoding.TextMarshaler).MarshalText() if err != nil { t.Fatal("error marshaling text:", err) } return b } if want, have := now.Add(3*time.Second).AppendFormat(nil, time.RFC822), mustMarshal(tv()); !reflect.DeepEqual(want, have) { t.Errorf("wrong time format: want %s, have %s", want, have) } if want, have := now.Add(4*time.Second).AppendFormat(nil, time.RFC822), mustMarshal(tv()); !reflect.DeepEqual(want, have) { t.Errorf("wrong time format: want %s, have %s", want, have) } } func BenchmarkValueBindingTimestamp(b *testing.B) { logger := log.NewNopLogger() lc := log.With(logger, "ts", log.DefaultTimestamp) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { lc.Log("k", "v") } } func BenchmarkValueBindingCaller(b *testing.B) { logger := log.NewNopLogger() lc := log.With(logger, "caller", log.DefaultCaller) b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { lc.Log("k", "v") } }
Close