MCPcopy
hub / github.com/jackc/pgx / Step

Method Step

internal/pgmock/pgmock.go:40–55  ·  view source on GitHub ↗
(backend *pgproto3.Backend)

Source from the content-addressed store, hash-verified

38}
39
40func (e *expectMessageStep) Step(backend *pgproto3.Backend) error {
41 msg, err := backend.Receive()
42 if err != nil {
43 return err
44 }
45
46 if e.any && reflect.TypeOf(msg) == reflect.TypeOf(e.want) {
47 return nil
48 }
49
50 if !reflect.DeepEqual(msg, e.want) {
51 return fmt.Errorf("msg => %#v, e.want => %#v", msg, e.want)
52 }
53
54 return nil
55}
56
57type expectStartupMessageStep struct {
58 want *pgproto3.StartupMessage

Callers

nothing calls this directly

Calls 1

ReceiveMethod · 0.45

Tested by

no test coverage detected