0a75d86850
roman: add 5 and refactor
2024-09-22 21:02:27 +02:00
2515644d4f
roman: refactor to use string building pattern
2024-09-22 20:59:11 +02:00
3a0808c599
roman: add 4
2024-09-22 20:57:12 +02:00
accb2c51dc
roman: use stringBuild for better performance(?)
2024-09-22 20:54:22 +02:00
5f93a0b843
roman: get start with the roman numerals
2024-09-22 20:53:13 +02:00
7a32f26bd5
context: implement a spy response writer to check if anything is written
2024-09-21 20:46:07 +02:00
c5582275e7
context: realistic usage of context.
...
Use a go routine for the work logic. Here sleep and append to string.
Inside the go routine, select for ctx.Done(). If happens, just stop and
return.
In the outside function, select for ctx.Done() too. If it happens, that
means the work logic has not finished before canceled.
2024-09-21 20:35:43 +02:00
c0db9ab22b
context: refactorize assert functions
2024-09-21 20:26:22 +02:00
0b181ccf0f
context: setup timeout context
2024-09-21 20:20:15 +02:00
d49f952035
context: add basic context test
2024-09-21 20:07:09 +02:00
436bcad0e1
counter: Use a constructor
2024-09-21 19:48:58 +02:00
6ded953ec6
counter: fix mutex copy issue
2024-09-21 19:47:27 +02:00
572c8033f6
counter: handle racing situation with mutex
2024-09-21 19:43:09 +02:00
ea6f225992
counter: refactor, add assertCounter func
2024-09-21 18:21:56 +02:00
41ae820a21
counter: add baisics
2024-09-21 17:51:58 +02:00
Muyao CHEN
a0bad4d6e9
walk: handle functions...
2024-09-20 21:04:25 +02:00
Muyao CHEN
ab7818e9ea
walk: handle channels
2024-09-20 21:00:47 +02:00
Muyao CHEN
574532f484
walk: handle map test separately
2024-09-20 20:51:44 +02:00
Muyao CHEN
10a93aeb27
walk: rerefacto
2024-09-20 20:44:40 +02:00
Muyao CHEN
61a0d0ff03
walk: deal with maps
2024-09-20 20:41:50 +02:00
Muyao CHEN
f64d75ca45
walk: deal with array
2024-09-20 20:37:54 +02:00
Muyao CHEN
799d730d14
walk: refacto slice and struct
2024-09-20 20:36:24 +02:00
Muyao CHEN
1c3ad9b9d8
walk: refacto
2024-09-20 20:32:37 +02:00
Muyao CHEN
049c346e63
walk: deal with slices
2024-09-20 20:27:53 +02:00
Muyao CHEN
80959f822b
waik: work with pointer
2024-09-20 20:19:49 +02:00
Muyao CHEN
30a408c9e4
walk: recursively search for string
2024-09-20 20:15:59 +02:00
Muyao CHEN
8026475424
walk: check if the field is of string type
2024-09-20 20:05:32 +02:00
Muyao CHEN
122770ae5c
walk: loop on the string fields
2024-09-20 20:00:05 +02:00
Muyao CHEN
766d7449e8
walk: refactor test to table test
2024-09-20 19:56:28 +02:00
b332088638
walk: reflect value of struct
2024-09-18 18:15:01 +02:00
3556c5b805
racer: test with timeout
2024-09-18 13:41:55 +02:00
ee89092ea4
racer: refactor. no hard code, don't repeat
2024-09-18 13:11:42 +02:00
3cc29f8383
racer: add timeout test
2024-09-18 13:08:31 +02:00
2dc7275f15
racer: use select to syncrho
2024-09-18 12:58:07 +02:00
5042f1048e
racer: refactor code to not repeat
2024-09-18 12:54:47 +02:00
3538818769
racer: test with httptest server
2024-09-18 12:45:58 +02:00
491d2c1b22
racer: add a first racer test
2024-09-18 10:15:53 +02:00
d83f1c6f4c
concurrency: use channel to handle racing situation
2024-09-18 09:48:00 +02:00
cd4f6fc6c7
concurrency: add timeout, pass the url as argument into goroutine, but still have concurrent write issue
2024-09-18 09:33:38 +02:00
cb8e6d23f3
concurrency: use goroutine(too fast)
2024-09-18 09:26:39 +02:00
93d9a14858
concurrency: add func, test, and bm test (mock and stub)
2024-09-18 09:16:56 +02:00
05226985c7
***countdown: add configurableSleeper abstraction
2024-09-17 21:43:48 +02:00
72e6ac9b77
[***]countdown: mock with sequence
2024-09-17 21:30:53 +02:00
56be76b275
countdown: add first mock for sleep
2024-09-17 21:21:07 +02:00
d7840e9cb7
countdown: add basic countdown
2024-09-17 21:11:08 +02:00
5f02a8fbde
greet: DI
2024-09-17 16:12:39 +02:00
f573268be9
dict: add delete method
2024-09-17 11:35:22 +02:00
c04a2e1d65
dict: add update method
2024-09-17 11:31:00 +02:00
4be80f4477
dict: deal with re-add
2024-09-17 10:19:25 +02:00
58efd33b20
dict: add Add function and tests
2024-09-17 10:10:07 +02:00