Skip to content

refactor: use additive diffing (no side effects) #5419

@acpana

Description

@acpana

Mostly from Walter:

Return Values Directly: Go's multiple return values are a powerful feature. Prefer returning values directly rather than using "out parameters" (passing pointers to be modified). If you do not need values from an input parameter then it should probably be a return value.

The ask here is to actually report a diff in places like this as opposed to adding fields to the existing diff passed in as a parameter

func InstancesMatch(desired *api.DatabaseInstance, actual *api.DatabaseInstance, diff *structuredreporting.Diff) bool {

Originally posted by @acpana in #5152 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions