Skip to content
Nikhil Bhat edited this page Apr 3, 2024 · 2 revisions

The diff package aims to identify discrepancies between two provided objects, particularly when comparing the contents of two files in formats such as YAML or JSON.

It accepts string inputs and generates the differences between them, similar to how terraform handles its states.

Therefore, a potential use case for this library is when implementing update functionality in your command line interfaces, where it needs to display the changes to be applied, as described earlier.

The real-time utilization of this library can be observed in the gocd-cli, as demonstrated here.

The end result of this would look like:

gocd-cli-update-feature

Clone this wiki locally