diff options
author | Jorin Vogel <hi@jorin.me> | 2017-08-02 14:25:05 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2017-08-03 15:57:51 +0200 |
commit | 81c13171a985b89f2af6682dbd1d4b8766cb9af7 (patch) | |
tree | db39d78bbe6da0ea3f3dd3d2f94c7e1571ad8fd6 /releaser/releaser.go | |
parent | 9891c0fb0eb274b8a95b62c40070a87a6e04088c (diff) |
Add some missing doc comments
As pointed out by the linter, some exported functions and types are
missing doc comments.
The linter warnings have been reduced from 194 to 116.
Not all missing comments have been added in this commit though.
Diffstat (limited to 'releaser/releaser.go')
-rw-r--r-- | releaser/releaser.go | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/releaser/releaser.go b/releaser/releaser.go index 2b7dbba5f..d32e511c6 100644 --- a/releaser/releaser.go +++ b/releaser/releaser.go @@ -31,12 +31,13 @@ import ( const commitPrefix = "releaser:" +// ReleaseHandler provides functionality to release a new version of Hugo. type ReleaseHandler struct { cliVersion string // If set, we do the releases in 3 steps: - // 1: Create and write a draft release notes - // 2: Prepare files for new version. + // 1: Create and write a draft release note + // 2: Prepare files for new version // 3: Release step int skipPublish bool @@ -80,6 +81,7 @@ func (r ReleaseHandler) calculateVersions() (helpers.HugoVersion, helpers.HugoVe return newVersion, finalVersion } +// New initialises a ReleaseHandler. func New(version string, step int, skipPublish, try bool) *ReleaseHandler { rh := &ReleaseHandler{cliVersion: version, step: step, skipPublish: skipPublish, try: try} @@ -95,6 +97,7 @@ func New(version string, step int, skipPublish, try bool) *ReleaseHandler { return rh } +// Run creates a new release. func (r *ReleaseHandler) Run() error { if os.Getenv("GITHUB_TOKEN") == "" { return errors.New("GITHUB_TOKEN not set, create one here with the repo scope selected: https://github.com/settings/tokens/new") |