It takes two times two labels and a table of relative time formats.
In addition to the generic time delta string (e.g. 5 minutes), the
labels are used applied so that the label corresponding to the
smaller time is applied.

HomeDir from https://github.com/mitchellh/go-homedir
Dir returns the home directory for the executing user.
This uses an OS-specific method for discovering the home directory.
An error is returned if a home directory cannot be detected.

RollbackError takes an error value returned by Apply and returns the error, if any,
that occurred when attempting to roll back from a failed update. Applications should
always call this function on any non-nil errors returned by Apply.

If no rollback was needed or if the rollback was successful, RollbackError returns nil,
otherwise it returns the error encountered when trying to roll back.

type Options struct {
// TargetPath defines the path to the file to update.
// The emptry string means 'the executable file of the running program'.TargetPathstring// Create TargetPath replacement with this file mode. If zero, defaults to 0755.TargetModeos.FileMode// Checksum of the new binary to verify against. If nil, no checksum or signature verification is done.Checksum []byte// Public key to use for signature verification. If nil, no signature verification is done.PublicKeycrypto.PublicKey// Signature to verify the updated file. If nil, no signature verification is done.Signature []byte// Use this hash function to generate the checksum. If not set, SHA256 is used.Hashcrypto.Hash// Store the old executable file at this path after a successful update.
// The empty string means the old executable file will be removed after the update.OldSavePathstring
}

CheckPermissions determines whether the process has the correct permissions to
perform the requested update. If the update can proceed, it returns nil, otherwise
it returns the error that would occur if an update were attempted.

A RelTimeMagnitude struct contains a relative time point at which
the relative format of time will switch to a new format string. A
slice of these in ascending order by their "D" field is passed to
CustomRelTime to format durations.

The Format field is a string that may contain a "%s" which will be
replaced with the appropriate signed label (e.g. "ago" or "from
now") and a "%d" that will be replaced by the quantity.

The DivBy field is the amount of time the time difference must be
divided by in order to display correctly.

e.g. if D is 2*time.Minute and you want to display "%d minutes %s"
DivBy should be time.Minute so whatever the duration is will be
expressed in minutes.