Skip to content
This repository was archived by the owner on Apr 9, 2024. It is now read-only.
This repository was archived by the owner on Apr 9, 2024. It is now read-only.

Use cmp in tests #188

@rbehjati

Description

@rbehjati

A conventional pattern in tests is to use the cmp package and the following pattern:

if diff := cmp.Diff(got, want); diff != "" {
  t.Errorf("<descriptive error message referring to got and want>")

Ideally this should be followed in all tests and much as possible.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions