I hereby claim:
- I am kare on github.
- I am kare (https://keybase.io/kare) on keybase.
- I have a public key whose fingerprint is 8A09 67D5 731C 7EE3 5B95 DF9F 8AC3 1763 3388 A6E6
To claim this, I am signing this object:
func httpHandler(next http.Handler) http.Handler { | |
fn := func(w http.ResponseWriter, r *http.Request) { | |
next.ServeHTTP(w, r) | |
} | |
return http.HandlerFunc(fn) | |
} |
I hereby claim:
To claim this, I am signing this object:
Character | Hex | ASCII | Description | |
---|---|---|---|---|
⎋ | 238B | 9099 | Esc | |
⌫ | 232B | 9003 | Backspace / Delete | |
⇪ | 21EA | 8682 | Capslock | |
⏎ | 23CE | 9166 | Return | |
⇧ | 21E7 | 8679 | Shift | |
⌥ | 2325 | 8997 | Option | |
⌘ | 2318 | 8984 | Command |
kkn% ps -ef | |
glenda 1 0:00 0:00 268K Await bootrc | |
glenda 3 0:00 0:00 0K Wakeme mouse | |
glenda 5 0:00 0:00 0K Wakeme alarm | |
glenda 7 0:00 0:00 188K Pread paqfs | |
glenda 9 0:00 0:00 128K Pread mntgen | |
glenda 14 0:00 0:00 136K Pread mntgen | |
glenda 18 0:00 0:00 116K Pread mntgen | |
glenda 30 0:00 0:00 0K Wakeme aoesweep | |
glenda 36 0:00 0:00 0K Wakeme rxmitproc |
#include <u.h> | |
#include <libc.h> | |
void | |
main(void) | |
{ | |
print("Hello, World!\n"); | |
exits(0); | |
} |
package math | |
func Sum(a, b int) int { | |
return a + b | |
} |
package math | |
import "testing" | |
func TestAddition(t *testing.T) { | |
cases := []struct { | |
name string | |
a int | |
b int | |
expected int |
=== RUN TestAddition | |
=== RUN TestAddition/add | |
=== RUN TestAddition/minus | |
=== RUN TestAddition/zero | |
--- PASS: TestAddition (0.00s) | |
math_test.go:6: setup test case | |
--- PASS: TestAddition/add (0.00s) | |
math_test.go:13: setup sub test | |
math_test.go:15: teardown sub test | |
--- PASS: TestAddition/minus (0.00s) |
=== RUN TestAddition | |
=== RUN TestAddition/add | |
--- PASS: TestAddition (0.00s) | |
math_test.go:6: setup test case | |
--- PASS: TestAddition/add (0.00s) | |
math_test.go:13: setup sub test | |
math_test.go:15: teardown sub test | |
math_test.go:8: teardown test case | |
PASS | |
ok github.com/kare/go-unit-test-setup-teardown 0.012s |
package math | |
import "testing" | |
func setupTestCase(t *testing.T) func(t *testing.T) { | |
t.Log("setup test case") | |
return func(t *testing.T) { | |
t.Log("teardown test case") | |
} | |
} |