mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 22:21:07 +03:00
all: Apply staticcheck recommendations
This commit is contained in:
parent
3011f36c27
commit
b5f39d23b8
41 changed files with 98 additions and 252 deletions
|
@ -147,10 +147,8 @@ func newBlackfriday(config map[string]interface{}) *BlackFriday {
|
|||
siteConfig[k] = v
|
||||
}
|
||||
|
||||
if config != nil {
|
||||
for k, v := range config {
|
||||
siteConfig[k] = v
|
||||
}
|
||||
for k, v := range config {
|
||||
siteConfig[k] = v
|
||||
}
|
||||
|
||||
combinedConfig := &BlackFriday{}
|
||||
|
@ -755,7 +753,7 @@ func externallyRenderContent(ctx *RenderingContext, path string, args []string)
|
|||
err := cmd.Run()
|
||||
// Most external helpers exit w/ non-zero exit code only if severe, i.e.
|
||||
// halting errors occurred. -> log stderr output regardless of state of err
|
||||
for _, item := range strings.Split(string(cmderr.Bytes()), "\n") {
|
||||
for _, item := range strings.Split(cmderr.String(), "\n") {
|
||||
item := strings.TrimSpace(item)
|
||||
if item != "" {
|
||||
jww.ERROR.Printf("%s: %s", ctx.DocumentName, item)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue