* multiple: add code for Fetcher to support the fetching of sequence-forming assertions
* asserts: obviously not a typo as I read it
* asserts: add new SeqFetcher interface
* asserts: add docs to NewSeqFetcher
* asserts: remove ResolveLatest and open another PR
* asserts: cleanup some doc comments, make sure they fit their use-cases. Include Fetcher interface in SequenceFormingFetcher. Rename SeqFetcher to SequenceFormingFetcher and the new function. Do some additional renaming. Reuse some code between FetchSequence and Fetch.
* asserts: add an additional unit test to document current behavior of multiple sequences of same assertion.
* asserts: update docs for NewSequenceFormingFetcher, readd a line I had removed accidently, the sequence number must be set back to 2 after testing with sequence 4
* asserts: add docs for the multiple-sequence behavior, add missing doc line for SequenceFormingFetcher.
* asserts: add unit tests for detecting circular references, clarify some of the terminology around sequences
---------
Co-authored-by: Michael Vogt <mvo@ubuntu.com>
Go 1.19 includes some changes to gofmt which intend to make lists and
heading clearer when rendered (https://go.dev/doc/go1.19). This commit
is the result of running the new gofmt and manually fixing some of it.
This was necessary because the new gofmt assumed lines beginning w/ tabs
to start lists or examples. While this is often true in our codebase,
we occasionally also use tabs to indent the lines after a TODO or FIXME
prefix or in yaml (e.g., excerpts of a snap.yaml). This meant that a lot of the
reformatted comments were broken and had to be fixed manually.
Signed-off-by: Miguel Pires <miguel.pires@canonical.com>
this adds a convenience AddToUpdate method to set up assertion
refreshes via the Pool support
this also adds methods to report error trying to fetch/resolve
assertions
doc comments are expanded to cross-cover these
AddBatch is still TODO