mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-26 22:04:32 +02:00
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.
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
9891c0fb0e
commit
81c13171a9
@@ -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")
|
||||
|
Reference in New Issue
Block a user