Commit Graph

23 Commits

Author SHA1 Message Date
Ivan Kozlovic
a3c423655e Fixed deprecated protobuf import reported by staticcheck
"encoders/protobuf/protobuf_enc.go:19:2: package github.com/golang/protobuf/proto is deprecated: Use the "google.golang.org/protobuf/proto" package instead."

I have replaced and regenerated the testdata protobuf code.

I have tested that if an app was built with the library before
the change and would receive a message generated with the updated
import it would work fine.
However an app using the updated library would need to replace

```
reflect.DeepEqual(m1, m2)
```
with
```
reflect.DeepEqual(m1.ProtoReflect(), m2.ProtoReflect())
```
The protobuf Message has different versions now.
Not sure if this going to break things or not, but the
github.com/golang/protobuf/proto is clearly marked as deprecated.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
2020-04-24 16:36:12 -06:00
Derek Collison
234e9d8119 Updates for rename and go.mod support
Signed-off-by: Derek Collison <derek@nats.io>
2019-05-10 13:24:55 -07:00
Derek Collison
2f0e8883ae CNCF, move to Apache 2 2018-03-17 13:36:48 -07:00
Peter Miron
acf11e4666 refactored to remove exported gnatsd dependency. (#315)
* refactored to remove exported gnatsd dependency.

* updated with prefix and coverage tests to accurately get coverage numbers for encoders packages.

* resolving coverage change issues.

* eliminated extra run of test for coverage.

* include -race in coverage

* updated to remove variable. thx @wallyqs
2017-08-18 14:11:32 -04:00
Peter Miron
84b40caf47 Revert "refactored to remove exported gnatsd dependency."
This reverts commit 00a57c7da1.
2017-08-18 10:10:21 -04:00
Peter Miron
00a57c7da1 refactored to remove exported gnatsd dependency. 2017-08-18 10:07:32 -04:00
Ivan Kozlovic
99feb29ddc Add gosimple, update staticcheck and go to .4 releases
Added gosimple + update to staticcheck

Based on @y0ssar1an PRs.

- Update go versions to .4
- Get gosimple package
- Updated staticcheck's URL
- Use staticcheck.ignore file for exceptions
- Moved build and staticcheck/gosimple checks in `before_script`
  section to fail fast
- Fixed reports from gosimple and staticcheck
2017-01-25 14:14:30 -07:00
Derek Collison
c1c9ec3f56 Rename of repo to go-nats 2016-11-20 11:50:22 -08:00
anatolii.prylutskyi
69b8f7810e Modified protobuf encoder to fix errors 2016-02-04 17:23:46 +02:00
anatolii.prylutskyi
a3c6069400 Add tests to show failed scenario for proto connection 2016-02-04 17:20:04 +02:00
Derek Collison
9e99c311db lint fixups 2016-01-16 10:44:11 -08:00
Derek Collison
0f97c04640 parallel test cleanup 2016-01-16 10:11:21 -08:00
Ivan Kozlovic
b63f1adb2e Fix RACE + tests cleanup
* Fixed RACE condition between flusher() and close() caused by kickFlusher invoked from close() outside of connection's lock.
* Specify "-p=1" in travis.yml so that package tests are not running in parallel, which otherwise may cause test failures.
* Systematic use of 'defer' for server shutdown and connection close, even when the server/connection is explicitly shutdown/close in the test (these calls are idemptotent anyway), so that if a failure occurs between the starting/creation of the server/connection, and the explicit shutdown/close, the appropriate cleanup function will be invoked.
* Adjusted some of the timings
* Made the test checking for the timing of the Closed state a warning instead of a fatal error, since even locally I would sometimes get more than what the test program is expecting (which could be even longer on Travis).
2015-11-10 14:43:49 -07:00
Paulo Pires
9716496421 Fixed build broken by #76 2015-11-08 20:34:54 +00:00
Paulo Pires
15e34bc5a8 Fixed missing b.N on struct marshalling. 2015-09-30 19:20:20 +01:00
Paulo Pires
b56b12109f Added struct serialization benchmarks. 2015-09-30 19:20:20 +01:00
Paulo Pires
195d212d55 Benchmarks shall ignore their set-up, i.e. connect to NATS server. 2015-09-30 19:20:20 +01:00
Paulo Pires
d2183620df Removed duplicated writes to channel. 2015-09-30 19:20:20 +01:00
Paulo Pires
87b232b13a Added benchmarks for encoding, structs only. 2015-09-30 19:20:20 +01:00
Derek Collison
4b382d07d2 Fix const reference for protobuf 2015-09-17 11:40:01 -07:00
Derek Collison
6ad8596974 Moved encoders into sub-directory, added server spinup 2015-09-13 08:21:46 -07:00
Derek Collison
dcb61ccfce test directory helpers, run gnatsd server start 2015-09-13 07:44:03 -07:00
Derek Collison
cde1444a39 Added protobuf encoder, new dir layout 2015-09-13 07:07:07 -07:00