Hey,
I'm Parker.

changelog

Source Code: https://github.com/parkr/changelog
Godoc: https://pkg.go.dev/byparker.com/go/changelog

If you maintain a project that has any number of consumers who need to keep up with changes to that project, you might be familiar with changelogs.

In an effort to automate updates to the changelog for Jekyll, I created a changelog go package that could be used to parse, update, and regenerate Jekyll’s changelog file, History.markdown. This makes it easier for all maintainers to be compliant with our policy about merging

The API is fairly straight forward:

// Create an empty changelog
changes := changelog.NewChangelog()

// Read from a file or an io.Reader
changes, err := changelog.NewChangelogFromFile("History.markdown")
changes, err := changelog.NewChangelogFromReader(req.Body)

// Add an entry (subsection is optional -- can also add ChangeLines to a version)
changes.AddLineToSubsection("HEAD", "Bug Fixes", &changelog.ChangeLine{
    Summary: "Fixed incorrect permalink generation",
    Reference: "#232",
})

// Generate the changelog and write it to the file
ioutil.WriteFile("History.markdown", []byte(changes.String()), os.ModePerm&0644)

Check out the README for changelog if you’re interested in learning more about how you can use this tool for your projects.

License

changelog is licensed under the MIT License, copyright Parker Moore.