Compare commits
219 Commits
v0.25.3-rc
...
master
Author | SHA1 | Date |
---|---|---|
|
9bf6a8369f | 3 days ago |
|
43bdd61803 | 3 days ago |
|
1563c264bd | 3 days ago |
|
14230d8696 | 3 days ago |
|
958c344f18 | 3 days ago |
|
8a7892463d | 3 days ago |
|
890e81cb66 | 1 week ago |
|
2d4bc95460 | 1 week ago |
|
93ca1e21c1 | 1 week ago |
|
d6973c979e | 1 week ago |
|
d4b2916650 | 1 week ago |
|
f9e5971978 | 1 week ago |
|
c8e65abfb1 | 1 week ago |
|
b4616ee8f1 | 1 week ago |
|
634ece4489 | 1 week ago |
|
a017c0e3fb | 1 week ago |
|
7bc9d15849 | 1 week ago |
|
8b36f7bc11 | 1 week ago |
|
30b2cd1e5c | 1 week ago |
|
a0b9360725 | 1 week ago |
|
d5171be998 | 1 week ago |
|
6e12cfa46c | 1 week ago |
|
d1de1ad8df | 1 week ago |
|
0ce8fb6db5 | 1 week ago |
|
3b9631b883 | 1 week ago |
|
474f5d28f4 | 1 week ago |
|
7ab8391070 | 1 week ago |
|
23f120e9db | 1 week ago |
|
e3444c0736 | 1 week ago |
|
669d992d59 | 2 weeks ago |
|
68c5238fe7 | 2 weeks ago |
|
4884379710 | 2 weeks ago |
|
437154d70e | 2 weeks ago |
|
2a9bbff8ce | 2 weeks ago |
|
4d7ca9d672 | 2 weeks ago |
|
587d0d5a27 | 3 weeks ago |
|
34fde59927 | 3 weeks ago |
|
fe8c3d3ee8 | 3 weeks ago |
|
013c2f2f04 | 3 weeks ago |
|
4208b0a63f | 3 weeks ago |
|
6de7aa97dc | 3 weeks ago |
|
f3e4f0ae64 | 3 weeks ago |
|
2b8f3e7080 | 3 weeks ago |
|
47b5048d82 | 4 weeks ago |
|
7d6eea0ff0 | 1 month ago |
|
99ce13a4ea | 1 month ago |
|
5cdfc2c972 | 1 month ago |
|
980687bc0e | 1 month ago |
|
8121a05c55 | 1 month ago |
|
ad0ac55b41 | 1 month ago |
|
192e90eea7 | 1 month ago |
|
812ffd3c40 | 1 month ago |
|
d0548f9ec9 | 1 month ago |
|
14959dbb2e | 1 month ago |
|
c0b7c33a58 | 1 month ago |
|
9e8087fbb1 | 1 month ago |
|
8673818980 | 1 month ago |
|
f3f484cee2 | 1 month ago |
|
fdb0cf03f6 | 1 month ago |
|
d4862a2520 | 1 month ago |
|
e08b27708b | 1 month ago |
|
b6afed3be7 | 1 month ago |
|
9355923799 | 1 month ago |
|
a8e9a18bcc | 1 month ago |
|
803d3d3981 | 1 month ago |
|
e0e7ae6c89 | 1 month ago |
|
72a8bb3d39 | 1 month ago |
|
5fa5a63de8 | 1 month ago |
|
9cbdc73809 | 1 month ago |
|
42341c7a39 | 1 month ago |
|
0dff5c4b84 | 1 month ago |
|
e3ba702811 | 1 month ago |
|
fe29ccaee3 | 1 month ago |
|
8cf5e3c2c6 | 1 month ago |
|
928d446e93 | 1 month ago |
|
e11833ef7a | 1 month ago |
|
591b9f743d | 1 month ago |
|
a2f2332848 | 2 months ago |
|
b1e31b1726 | 2 months ago |
|
cca6f6d01b | 2 months ago |
|
d037ed6ff2 | 2 months ago |
|
9b2566556e | 2 months ago |
|
8933a2e514 | 2 months ago |
|
2c71543d33 | 2 months ago |
|
949e2fdb1c | 2 months ago |
|
281efbb949 | 2 months ago |
|
14b1211e7a | 2 months ago |
|
0b894a0d4a | 2 months ago |
|
20e315bac0 | 2 months ago |
|
296ac4e207 | 2 months ago |
|
28a87bbaa6 | 2 months ago |
|
bf03d56ae4 | 2 months ago |
|
6715c653ca | 2 months ago |
|
798e190621 | 2 months ago |
|
5072d7a58f | 2 months ago |
|
9cbab5a5b3 | 2 months ago |
|
03c3cf5790 | 2 months ago |
|
d6bf551f87 | 2 months ago |
|
f4d506f659 | 2 months ago |
|
1e5e267b2b | 2 months ago |
|
760014c64b | 2 months ago |
|
2561a7271e | 2 months ago |
|
39653050dc | 2 months ago |
|
65cfee56df | 2 months ago |
|
8d4effcce8 | 2 months ago |
|
4a375592d3 | 2 months ago |
|
d7ed03124f | 2 months ago |
|
87202001a8 | 2 months ago |
|
57a6b85388 | 2 months ago |
|
0ba61c58e8 | 2 months ago |
|
b0fabe1346 | 2 months ago |
|
113a6dd8ab | 2 months ago |
|
6bc0a86207 | 2 months ago |
|
aa543a335a | 2 months ago |
|
4879376138 | 2 months ago |
|
2fcf34066b | 2 months ago |
|
07279dd248 | 2 months ago |
|
4c6b0b318e | 2 months ago |
|
f1a2c68f43 | 2 months ago |
|
7df3ad05ed | 2 months ago |
|
4202d6673c | 2 months ago |
|
d6bbe5b06b | 2 months ago |
|
721345eea6 | 2 months ago |
|
db92404342 | 2 months ago |
|
725a913f66 | 2 months ago |
|
397877a7b6 | 2 months ago |
|
b226b6eb4c | 2 months ago |
|
02956ad0e3 | 2 months ago |
|
037554e774 | 2 months ago |
|
1513152cb2 | 2 months ago |
|
c9ba31ae61 | 2 months ago |
|
1f69ff84a1 | 2 months ago |
|
a76f07143b | 2 months ago |
|
08ef9fe245 | 2 months ago |
|
57d628513b | 2 months ago |
|
d5758ba3a3 | 3 months ago |
|
166c4968cf | 3 months ago |
|
1be0932a0f | 3 months ago |
|
f04a5e39c4 | 3 months ago |
|
d1523c93bc | 3 months ago |
|
44c48a7494 | 3 months ago |
|
188e4e3ff3 | 3 months ago |
|
395a3eeb93 | 3 months ago |
|
4772d7cc28 | 3 months ago |
|
854288a0cb | 3 months ago |
|
4016b69b28 | 3 months ago |
|
b5b723e835 | 3 months ago |
|
0a6e79a745 | 3 months ago |
|
9d86361ae3 | 3 months ago |
|
7e053437b1 | 3 months ago |
|
014b4ef2c0 | 3 months ago |
|
21734f7742 | 3 months ago |
|
927cd97bd5 | 3 months ago |
|
2650944d65 | 3 months ago |
|
7888d868ba | 3 months ago |
|
56c4f3bdd5 | 3 months ago |
|
14c9de2570 | 3 months ago |
|
44f44e34e4 | 3 months ago |
|
73c827c7fa | 3 months ago |
|
9874214669 | 3 months ago |
|
c5a13d86ba | 3 months ago |
|
70085fcfeb | 3 months ago |
|
1a768ad522 | 3 months ago |
|
4dfade10b8 | 3 months ago |
|
9a75f93250 | 3 months ago |
|
fe364d5081 | 3 months ago |
|
0ac9023590 | 3 months ago |
|
10f6a901ec | 3 months ago |
|
ef1631b00d | 3 months ago |
|
6204a1441e | 3 months ago |
|
d03700b155 | 3 months ago |
|
1362d4dea6 | 3 months ago |
|
cc7ac97c51 | 3 months ago |
|
22781b8460 | 3 months ago |
|
9033120401 | 3 months ago |
|
87506d738c | 3 months ago |
|
4940556234 | 3 months ago |
|
299102955b | 3 months ago |
|
5254702130 | 3 months ago |
|
b7a6b93717 | 3 months ago |
|
9b1dfcf5d0 | 4 months ago |
|
9327859f55 | 4 months ago |
|
26b7761a9c | 4 months ago |
|
b8510dd5b2 | 4 months ago |
|
4cae19f94f | 4 months ago |
|
af76ebdc1d | 4 months ago |
|
2e9c5bbc1a | 4 months ago |
|
a7a4b47ead | 4 months ago |
|
01de10d447 | 4 months ago |
|
fa5117adaa | 4 months ago |
|
bbb80cde16 | 4 months ago |
|
f02d4546a9 | 4 months ago |
|
ec223c1cc2 | 4 months ago |
|
b7e3e0be20 | 4 months ago |
|
022deaf610 | 4 months ago |
|
5853c73268 | 4 months ago |
|
cf0d6f8f5c | 4 months ago |
|
3656b458ea | 4 months ago |
|
69c7ca9809 | 4 months ago |
|
10aa48c74a | 4 months ago |
|
2a47644d31 | 4 months ago |
|
d392c169fc | 4 months ago |
|
7fd524f70b | 4 months ago |
|
0898c6db97 | 4 months ago |
|
0d5c692b2c | 4 months ago |
|
cd3e91b198 | 4 months ago |
|
b9d6bfc1eb | 4 months ago |
|
532b9df0a3 | 4 months ago |
|
06696e6492 | 4 months ago |
|
7e5f10927f | 4 months ago |
|
535e2a96d5 | 4 months ago |
|
b83b8aa079 | 4 months ago |
|
2255857b3a | 4 months ago |
|
5c2572c443 | 4 months ago |
|
cf8a50157f | 4 months ago |
|
a58f5956e3 | 4 months ago |
|
c1c2e73475 | 4 months ago |
|
4213a190d5 | 4 months ago |
|
e542a26d4b | 4 months ago |
@ -0,0 +1,32 @@
|
||||
package acme
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"errors"
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestIsErrNotFound(t *testing.T) {
|
||||
type args struct {
|
||||
err error
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
args args
|
||||
want bool
|
||||
}{
|
||||
{"true ErrNotFound", args{ErrNotFound}, true},
|
||||
{"true sql.ErrNoRows", args{sql.ErrNoRows}, true},
|
||||
{"true wrapped ErrNotFound", args{fmt.Errorf("something failed: %w", ErrNotFound)}, true},
|
||||
{"true wrapped sql.ErrNoRows", args{fmt.Errorf("something failed: %w", sql.ErrNoRows)}, true},
|
||||
{"false other", args{errors.New("not found")}, false},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
if got := IsErrNotFound(tt.args.err); got != tt.want {
|
||||
t.Errorf("IsErrNotFound() = %v, want %v", got, tt.want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package client
|
||||
|
||||
import "context"
|
||||
|
||||
type contextKey struct{}
|
||||
|
||||
// NewRequestIDContext returns a new context with the given request ID added to the
|
||||
// context.
|
||||
func NewRequestIDContext(ctx context.Context, requestID string) context.Context {
|
||||
return context.WithValue(ctx, contextKey{}, requestID)
|
||||
}
|
||||
|
||||
// RequestIDFromContext returns the request ID from the context if it exists.
|
||||
// and is not empty.
|
||||
func RequestIDFromContext(ctx context.Context) (string, bool) {
|
||||
v, ok := ctx.Value(contextKey{}).(string)
|
||||
return v, ok && v != ""
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue