Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶
type Aggregator interface { // ListNoteFiles will retrieve the base filenames of all files that are // considered to be release notes. This function matches all Markdown // files (with `*.md` extension), but ignores README.md (if present). ListNoteFiles(ctx context.Context, fs vfs.FS, notesDir string) ([]string, error) // Aggregate will process all release notes in the //relnotes directory. // It will read the current release notes file, identified by |relnotesPath|, // to determine the next milestone number. It then aggregates the individual // release notes, contained in the //relnotes folder, into a single // markdown list. This list will be inserted as a new milestone heading // section into a release notes Markdown stream returned as an array of bytes. // This function does not modify the existing release notes file. Aggregate(ctx context.Context, fs vfs.FS, currentMilestone int, aggregateFilePath, relnotesDir string) ([]byte, error) }
Aggregator defines an interface for processing all release notes for an upcoming release milestone into a single file.
type AggregatorImpl ¶
type AggregatorImpl struct { }
func NewAggregator ¶
func NewAggregator() *AggregatorImpl
NewAggregator creates a new relnotes AggregatorImpl object that can be used to aggregate release notes.
func (*AggregatorImpl) Aggregate ¶
func (a *AggregatorImpl) Aggregate(ctx context.Context, fs vfs.FS, newMilestone int, aggregateFilePath, relnotesDir string) ([]byte, error)
Aggregate does the following:
- Read all release notes contained within the |relnotesDir| directory.
- Create a new m+1 milestone heading with the new release notes included in an unordered list.
- Return a new byte array which are the existing release notes, read from |aggregateFilePath|, but with the new milestone section inserted at the top of the stream.
This function does not modify any files on disk. The caller is responsible for writing these modified release notes to disk if desired.
func (*AggregatorImpl) ListNoteFiles ¶
func (a *AggregatorImpl) ListNoteFiles(ctx context.Context, fs vfs.FS, notesDir string) ([]string, error)
provide implementation of ListNoteFiles.
Click to show internal directories.
Click to hide internal directories.