Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Commit

Permalink
README clarifications
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed May 19, 2021
1 parent 9901549 commit dddce4b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ See below for specific examples of using the various packages.
### ./diff: Kubernetes Object Comparator

The utilities in this package are intended to be in used in the context of custom Kubernetes controllers,
when comparing the live state of a Kubernetes object (fetched via API) with its desired state (constructed
when comparing the live state of a Kubernetes object (fetched via API) against a desired state (constructed
via code). The "live" object, fetched from Kubernetes, will auto-generate many fields that we won't
or can't specify in the "desired" object that we construct. A common job of a Kubernetes controller is to
compare a desired and live object, and `Apply()` changes if they are different. But we don't want these
auto-generated fields to cause us to apply changes. A standard Golang struct comparison _will_ detect these
as differences, and is therefore insufficient for our purposes here.
auto-generated fields to cause us to apply changes, otherwise we'd be doing so frequently. A standard Golang
struct comparison _will_ detect these as differences, and is therefore insufficient for our purposes here.

Our `Diff()` function simply performs a recursive struct comparison that ignores any fields that were unspecified
Our `Diff()` function simply performs a recursive struct comparison, but ignores any fields that were unspecified
in the `toObject` (the desired object):

```
Expand Down

0 comments on commit dddce4b

Please sign in to comment.