diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-03-24 10:11:16 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2019-03-24 16:14:51 +0100 |
commit | b5f39d23b86f9cb83c51da9fe4abb4c19c01c3b7 (patch) | |
tree | cf23180dc07698391cf47c2fe525755417729020 /helpers/pygments.go | |
parent | 3011f36c27ecde309325e6c75ca377f4f87fa97a (diff) |
all: Apply staticcheck recommendations
Diffstat (limited to 'helpers/pygments.go')
-rw-r--r-- | helpers/pygments.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/helpers/pygments.go b/helpers/pygments.go index 64c5b3ea8..0fe1e7592 100644 --- a/helpers/pygments.go +++ b/helpers/pygments.go @@ -153,7 +153,7 @@ func (h highlighters) pygmentsHighlight(code, lang, optsStr string) (string, err return code, err } - str := string(normalizeExternalHelperLineFeeds([]byte(out.String()))) + str := string(normalizeExternalHelperLineFeeds(out.Bytes())) str = h.injectCodeTag(str, lang) @@ -235,10 +235,8 @@ func parseOptions(defaults map[string]string, in string) (map[string]string, err in = strings.Trim(in, " ") opts := make(map[string]string) - if defaults != nil { - for k, v := range defaults { - opts[k] = v - } + for k, v := range defaults { + opts[k] = v } if in == "" { |