Skip to content

Commit

Permalink
refactor: entire codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
wI2L committed Feb 1, 2020
1 parent cad82da commit 94e9fa2
Show file tree
Hide file tree
Showing 43 changed files with 5,185 additions and 6,531 deletions.
42 changes: 42 additions & 0 deletions .revive.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
ignoreGeneratedHeader = true
severity = "warning"
confidence = 0.8
errorCode = 0
warningCode = 0

[rule.blank-imports]
[rule.context-as-argument]
[rule.context-keys-type]
[rule.dot-imports]
[rule.error-return]
[rule.error-strings]
[rule.error-naming]
[rule.exported]
[rule.if-return]
[rule.increment-decrement]
[rule.var-naming]
[rule.var-declaration]
[rule.package-comments]
[rule.range]
[rule.range-val-in-closure]
[rule.receiver-naming]
[rule.time-naming]
[rule.unexported-return]
[rule.indent-error-flow]
[rule.errorf]
[rule.empty-block]
[rule.empty-lines]
[rule.superfluous-else]
[rule.unused-parameter]
[rule.unused-receiver]
[rule.unreachable-code]
[rule.redefines-builtin-id]
[rule.atomic]
[rule.deep-exit]
[rule.unnecessary-stmt]
[rule.struct-tag]
[rule.modifies-value-receiver]
[rule.waitgroup-by-value]
[rule.duplicated-imports]
[rule.import-shadowing]
[rule.unhandled-error]
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,22 @@ All notable changes to this project are documented in this file.

**THIS LIBRARY IS STILL IN ALPHA AND THERE ARE NO GUARANTEES REGARDING API STABILITY YET**

## [v0.5.0] - 2020-02-02
#### Refactor of entire project.
This include the following changes, but not limited to:

- Remove the `Encoder` type to simplify the usage of the library and stick more closely to the design of `encoding/json`
- Reduce the number of closures used. This improves readability of stacktraces and performance profiles.
- Improve the marshaling performances of many types.
- Add support for marshaling `json.RawMessage` values.
- Add new options `DenyList`, `NoNumberValidation`, `NoCompact`, and rename some others.
- Replace the `Marshaler` and `MarshalerCtx` interfaces by `AppendMarshaler` and `AppendMarshalerCtx` to follow the new "append" model.
- Remove the `IntegerBase` option, which didn't worked properly with the `string` JSON tag.

> Some of the improvements have been inspired by the **github.com/segmentio/encoding** project.
## [v0.4.1] - 2019-10-23
- Fix unsafe misuses reported by go vet and the new `-d=checkptr` cmd/compile flag introduced in the Go1.14 development tree by Matthew Dempsky. The issues were mostly related to invalid arithmetic operations and dereferences.
- Fix unsafe misuses reported by go vet and the new `-d=checkptr` cmd/compile flag introduced in the Go1.14 development tree by *Matthew Dempsky*. The issues were mostly related to invalid arithmetic operations and dereferences.
- Fix map key types precedence order during marshaling. Keys of any string type are used directly instead of the `MarshalText` method, if the types also implement the `encoding.TextMarshaler` interface.

## [v0.4.0] - 2019-10-18
Expand Down Expand Up @@ -36,6 +50,7 @@ All notable changes to this project are documented in this file.
## [v0.1.0] - 2019-08-30
Initial realease.

[v0.5.0]: https://github.com/wI2L/jettison/compare/v0.4.1...v0.5.0
[v0.4.1]: https://github.com/wI2L/jettison/compare/v0.4.0...v0.4.1
[v0.4.0]: https://github.com/wI2L/jettison/compare/v0.3.1...v0.4.0
[v0.3.1]: https://github.com/wI2L/jettison/compare/v0.3.0...v0.3.1
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 William Poussier
Copyright (c) 2019-2020 William Poussier <william.poussier@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
212 changes: 87 additions & 125 deletions README.md

Large diffs are not rendered by default.

Loading

0 comments on commit 94e9fa2

Please sign in to comment.