Commit Graph

41 Commits

Author SHA1 Message Date
thinkerou 4b68a5f12a
chore: update go.mod and remove space from copyright (#3158)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-28 10:42:28 +08:00
thinkerou 2bde107686
test support go1.18 (#2990) 2022-03-21 09:43:17 +08:00
Tommy Chu d4e72a17f7
Fix typo (#2926) 2021-10-31 09:23:08 +08:00
Georges Varouchas f969bfaf50
implement ".Unwrap() error" on Error type (#2525) (#2526)
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: thinkerou <thinkerou@gmail.com>
2020-10-17 21:22:37 +08:00
bestgopher c9b8535817
Rename some variables (#2393) 2020-05-25 20:13:09 +08:00
guonaihong b67bc8f005 Gin1.5 bytes.Buffer to strings.Builder (#1939)
* Replace bytes.Buffer to strings.Builder

* Merge the latest changes

* Update errors.go
2019-06-29 20:43:32 +08:00
Riverside 057f63b1bb spell check (#1796)
* spell check

* variable path collides with imported package name

* spell check
2019-03-05 09:41:37 +08:00
root@andrea:~# 8fb21a8bef Added some comments to avoid having golint warnings (#1619)
The following comments to vars, conts and method were added to pass  `golinter` with 100%.

![captura de pantalla 2018-10-31 a la s 15 23 37](https://user-images.githubusercontent.com/10160626/47819725-faba3780-dd20-11e8-978c-1b3ab7de26ed.png)
2018-11-01 15:30:19 +08:00
田欧 6db092f778 chore: add some annotations (#1550)
ref #1075 should all annotations and can close #1075 .
2018-09-15 15:21:54 +08:00
田欧 72db8acd99
add internal package which includes json package (#1504) 2018-08-30 19:04:03 +08:00
Boris Borshevsky 6f94fd05c9 Linting and optimizing struct memory signature. (#1184)
* fix cleanPath spell (#969)

* linter and optimize structs
2017-11-29 10:50:14 +08:00
田欧 a8fa424ae5 update comment (#1057) 2017-08-16 11:55:50 +08:00
Bo-Yi Wu ce670a6497 refactor(json): make jsonite optional with build tags (#1026)
* refactor(json): Restore gin support for app engine

Create new folder to support multiple json package.
restore gin support for app engine (disable jsonite through tags)

use jsoniter

$ go build -tags=jsoniter .

use default json

$ go build .

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* rename json file.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* docs(json): add build tags document.

* fix(docs): markdown format.

* fix(json): missing space.
2017-07-18 23:01:29 +02:00
Bo-Yi Wu e23842ecab
fix json sort the map keys
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-07-08 18:19:09 +08:00
Bo-Yi Wu 12508320c2
feat: change json lib to jsoniter
A high-performance 100% compatible drop-in replacement of "encoding/json"

https://github.com/json-iterator/go

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-07-08 16:51:36 +08:00
田欧 b985857899 update func comment (#981) 2017-07-05 20:28:16 -05:00
田欧 d535fcd598 separate type define (#975) 2017-07-05 02:47:36 -05:00
Bo-Yi Wu 1e1e4fc867 Add Makefile to check the following thing (#947)
* Add Makefile to check the following thing.

* vet check
* fmt check
* embedmd check
* misspell check

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* remove unused variable.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-06-12 21:50:42 -05:00
Tevin Jeffrey c8b35d3445 Fix for #630
Details can be found in issue #630
2016-12-05 03:58:31 -06:00
Javier Provecho Fernandez 9e930b9bdd lint code 2016-04-15 01:16:46 +02:00
Manu Mtz.-Almeida 61fae4997d Improves documentation 2016-01-26 22:40:29 +01:00
Manu Mtz-Almeida a20984c2bc Adds comments 2015-07-02 18:42:33 +02:00
Manu Mtz-Almeida 7e7004a224 Improves errors.ByType() implementation 2015-06-12 21:34:06 +02:00
Manu Mtz-Almeida c0383dff6b Adds IsType() helper 2015-06-12 21:33:16 +02:00
Manu Mtz-Almeida dde06a07f0 Logger only prints internal errors 2015-06-06 17:24:16 +02:00
Manu Mtz-Almeida 835f66fdc9 404 not found performance improvements
benchmark            old ns/op     new ns/op     delta
Benchmark404         737           249           -66.21%
Benchmark404Many     2330          454           -80.52%

benchmark            old allocs     new allocs     delta
Benchmark404         3              0              -100.00%
Benchmark404Many     10             0              -100.00%

benchmark            old bytes     new bytes     delta
Benchmark404         115           68            -40.87%
Benchmark404Many     235           57            -75.74%
2015-05-30 14:45:13 +02:00
Manu Mtz-Almeida 48633f7001 Better documentation 2015-05-29 21:03:41 +02:00
Manu Mtz-Almeida 35fd7fb480 JSON flags are not longer needed. 2015-05-23 02:01:43 +02:00
Manu Mtz-Almeida 2ebb6dcb95 Using uint64 for ErrorType 2015-05-23 01:59:36 +02:00
Artem 68a7a6816c patch for #298 2015-05-23 02:19:07 +03:00
Manu Mtz-Almeida 992b00f96a Cosmetic changes 2015-05-22 19:21:35 +02:00
Manu Mtz-Almeida 4eeca21039 Errors conforms to MarshalJSON interface 2015-05-22 18:34:42 +02:00
Manu Mtz-Almeida 37b6f6c179 Fixing new errors API 2015-05-22 16:39:15 +02:00
Manu Mtz-Almeida 71bd9f4500 New JSON error facilities 2015-05-22 04:43:43 +02:00
Manu Mtz-Almeida b7205a6ec2 Fixes new errors API. 2015-05-22 03:43:39 +02:00
Manu Mtz-Almeida e94247f9ad New errors API!! 2015-05-22 03:25:21 +02:00
Manu Mtz-Almeida 99694bb716 Fixes errors 2015-05-12 15:22:13 +02:00
Manu Mtz-Almeida b690611c38 Better debug logging + unit tests 2015-05-09 03:34:43 +02:00
Manu Mtz-Almeida 0a192fb0fa Tons of unit tests 2015-04-09 12:15:02 +02:00
Manu Mtz-Almeida ac0ad2fed8 Improves unit tests 2015-04-08 02:58:35 +02:00
Manu Mtz-Almeida 59d949d350 Moves errorMsg to errors.go 2015-03-26 14:10:46 +01:00