Skip to content

Commit

Permalink
linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JensErat committed Feb 7, 2023
1 parent 5f91215 commit 83f0005
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions replacer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"math"
"os"
"path/filepath"
"regexp"
"runtime"
"strconv"
"strings"
Expand Down Expand Up @@ -276,9 +275,6 @@ func (r *Replacer) replace(input, empty string, treatUnknownAsEmpty, errOnEmpty,
return "", false, fmt.Errorf("unrecognized placeholder %s%s%s",
string(phOpen), key, string(phClose))
}
// move cursors over placeholder
placeholderStart = placeholderEnd + 1
lastWriteCursor = placeholderStart
// if not supposed to treat unknown placeholders as empty values, print the unescaped copy
if !treatUnknownAsEmpty {
allPlaceholdersFound = false
Expand Down Expand Up @@ -429,6 +425,3 @@ var nowFunc = time.Now
const ReplacerCtxKey CtxKey = "replacer"

const phOpen, phClose, phEscape, phQuote, phColon = '{', '}', '\\', '"', ':'

var varDefaultDelimiter = regexp.MustCompile(`[^\\](:)`)
var escapedDefaultDelimiter = regexp.MustCompile(`\\:`)

0 comments on commit 83f0005

Please sign in to comment.