mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00: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
@@ -30,7 +30,8 @@ func (b BaseURL) String() string {
|
||||
return b.urlStr
|
||||
}
|
||||
|
||||
// Protocol is normally on the form "scheme://", i.e. "webcal://".
|
||||
// WithProtocol returns the BaseURL prefixed with the given protocol.
|
||||
// The Protocol is normally of the form "scheme://", i.e. "webcal://".
|
||||
func (b BaseURL) WithProtocol(protocol string) (string, error) {
|
||||
u := b.URL()
|
||||
|
||||
@@ -55,8 +56,9 @@ func (b BaseURL) WithProtocol(protocol string) (string, error) {
|
||||
return u.String(), nil
|
||||
}
|
||||
|
||||
// URL returns a copy of the internal URL.
|
||||
// The copy can be safely used and modified.
|
||||
func (b BaseURL) URL() *url.URL {
|
||||
// create a copy as it will be modified.
|
||||
c := *b.url
|
||||
return &c
|
||||
}
|
||||
|
Reference in New Issue
Block a user