guoguangwu
115e48a202
chore: remove refs to deprecated io/ioutil
...
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com >
2023-10-19 11:05:38 +08:00
pancho horrillo
206aac5747
Rename package srverrors to httperror
...
- Package names are preferred to be in singular form¹.
- Since errors are just for HTTP and not generic, I changed the base name to
'http'.
- I didn't name it simply 'error', because it would then conflict with the
- standard 'error' interface.
¹: https://rakyll.org/style-packages/
2019-11-20 07:54:45 +01:00
pancho horrillo
75b0908b16
Rename GetReasonFromBody() to simply Reason()
...
See ¹ for the customary idiomatic way of naming getters in Go.
¹: https://golang.org/doc/effective_go.html#Getters
2019-11-20 05:04:10 +01:00
pancho horrillo
3a47b34bc1
Drop stale GetReason() and associated tests
2019-11-20 04:54:07 +01:00
pancho horrillo
b40f73115f
Add missing comment to GetReasonFromBody()
2019-11-20 04:51:29 +01:00
pancho horrillo
e7619238ae
Add GetReasonFromBody() that extracts reason from JSON
2019-11-19 21:17:34 +01:00
pancho horrillo
2d5743af84
Add blank line between legal header and package declaration
...
Otherwise, the legal header is rendered as package documentation.
2019-11-13 18:18:44 +01:00
Héctor Hurtado
723e4787b3
Added legal header to all Go source files
2019-10-23 13:35:01 +02:00
Roberto Abdelkader Martínez Pérez
43abacbb2f
Linter rules
2019-10-03 15:06:09 +02:00
Roberto Abdelkader Martínez Pérez
80eea3c886
Documentation and better naming
2019-10-03 14:17:24 +02:00
Roberto Abdelkader Martínez Pérez
681ee3cba8
http becomes an internal package
2019-10-03 14:12:14 +02:00