MCPcopy
hub / github.com/nats-io/nats.go / NewGobEncodedConn

Function NewGobEncodedConn

test/gob_test.go:25–31  ·  view source on GitHub ↗

lint:file-ignore SA1019 Ignore deprecation warnings for EncodedConn

(tl TestLogger)

Source from the content-addressed store, hash-verified

23//lint:file-ignore SA1019 Ignore deprecation warnings for EncodedConn
24
25func NewGobEncodedConn(tl TestLogger) *nats.EncodedConn {
26 ec, err := nats.NewEncodedConn(NewConnection(tl, TEST_PORT), nats.GOB_ENCODER)
27 if err != nil {
28 tl.Fatalf("Failed to create an encoded connection: %v\n", err)
29 }
30 return ec
31}
32
33func TestEncBuiltinGobMarshalString(t *testing.T) {
34 s := RunServerOnPort(TEST_PORT)

Calls 2

FatalfMethod · 0.80
NewConnectionFunction · 0.70

Tested by

no test coverage detected