Commit dc8fb20
authored
refactor: minor tweaks to
A handful of drive-by tweaks to the `/drip` implementation:
- Update docs to clarify intended uses (a helpful reminder for myself,
if nothing else)
- Ensure all bad requests use standard JSON error responses
- Switch from binary to text content type
This also includes a small fix to the internal testing library, dropping
the `assert.RoughDuration()` helper in favor of an updated generic
`assert.RoughlyEqual()` implementation that works with the
`time.Duration` type./drip implementation (#185)1 parent 24529f4 commit dc8fb20
File tree
5 files changed
+28
-24
lines changed- httpbin
- static
- websocket
- internal/testing/assert
5 files changed
+28
-24
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
613 | | - | |
614 | | - | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
615 | 622 | | |
616 | 623 | | |
617 | 624 | | |
| |||
660 | 667 | | |
661 | 668 | | |
662 | 669 | | |
663 | | - | |
| 670 | + | |
664 | 671 | | |
665 | 672 | | |
666 | 673 | | |
| |||
682 | 689 | | |
683 | 690 | | |
684 | 691 | | |
685 | | - | |
| 692 | + | |
686 | 693 | | |
687 | 694 | | |
688 | 695 | | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
689 | 699 | | |
690 | 700 | | |
691 | | - | |
692 | | - | |
693 | | - | |
| 701 | + | |
694 | 702 | | |
695 | 703 | | |
696 | 704 | | |
697 | 705 | | |
698 | 706 | | |
699 | 707 | | |
700 | 708 | | |
701 | | - | |
702 | 709 | | |
703 | 710 | | |
704 | 711 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
741 | | - | |
| 741 | + | |
742 | 742 | | |
743 | 743 | | |
744 | 744 | | |
| |||
2037 | 2037 | | |
2038 | 2038 | | |
2039 | 2039 | | |
2040 | | - | |
| 2040 | + | |
2041 | 2041 | | |
2042 | 2042 | | |
2043 | 2043 | | |
| |||
2125 | 2125 | | |
2126 | 2126 | | |
2127 | 2127 | | |
2128 | | - | |
| 2128 | + | |
2129 | 2129 | | |
2130 | 2130 | | |
2131 | 2131 | | |
| |||
3240 | 3240 | | |
3241 | 3241 | | |
3242 | 3242 | | |
3243 | | - | |
| 3243 | + | |
3244 | 3244 | | |
3245 | 3245 | | |
3246 | 3246 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
284 | | - | |
| 284 | + | |
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
366 | | - | |
| 366 | + | |
367 | 367 | | |
368 | 368 | | |
369 | 369 | | |
370 | | - | |
| 370 | + | |
371 | 371 | | |
372 | 372 | | |
373 | 373 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 132 | + | |
| 133 | + | |
137 | 134 | | |
138 | 135 | | |
139 | | - | |
140 | | - | |
| 136 | + | |
| 137 | + | |
141 | 138 | | |
142 | 139 | | |
143 | | - | |
| 140 | + | |
144 | 141 | | |
145 | 142 | | |
0 commit comments