github gruntwork-io/boilerplate v0.10.0

one day ago

🛠️ Breaking Changes

Numerous breaking changes have taken place through the integration of fixes related to findings of golangci-lint, which is now integrated into the codebase.

Public structs that previously had fields that did not obey standard Golang practices for casing have been updated to consistently follow best practices.

e.g.

// The command-line options for the boilerplate app
type BoilerplateOptions struct {
	TemplateUrl string
	TemplateFolder string
	OutputFolder            string
	NonInteractive          bool
	Vars                    map[string]interface{}
	OnMissingKey            MissingKeyAction
	OnMissingConfig         MissingConfigAction
	NoHooks                 bool
	NoShell                 bool
	DisableDependencyPrompt bool
	ExecuteAllShellCommands bool
	ShellCommandAnswers map[string]bool
}

Is now:

// BoilerplateOptions represents the command-line options for the boilerplate app
type BoilerplateOptions struct {
	Vars                    map[string]any
	ShellCommandAnswers     map[string]bool
	TemplateURL             string
	TemplateFolder          string
	OutputFolder            string
	OnMissingKey            MissingKeyAction
	OnMissingConfig         MissingConfigAction
	NonInteractive          bool
	NoHooks                 bool
	NoShell                 bool
	DisableDependencyPrompt bool
	ExecuteAllShellCommands bool
}

Renaming TemplateUrl to TemplateURL follows the Golang best practice of using all caps for initialisms, and the golangci-lint linter will enforce this practice going forward for all variables. Note that this change also resulted in the shuffling of some struct fields to obey the best practice recommended by the fieldalignment linter in govet, which minimizes the size of structs by properly aligning the field values to reduce padding.

Finally, variables available in templates with improper casing like TemplateUrl have been updated to TemplateURL to continue this pattern of obeying best practices, but TemplateUrl is backwards compatible for the foreseeable future. We may decide to announce deprecation and removal at a later date.

These breaking changes should only require action on your end if you rely on Boilerplate as a Golang library, not as a standalone binary.

What's Changed

New Contributors

Full Changelog: v0.9.0...v0.10.0

Don't miss a new boilerplate release

NewReleases is sending notifications on new releases.