Skip to content

Commit

Permalink
fix imports and gofmt -s
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Galbreath committed Apr 13, 2017
1 parent 53fa4f7 commit a5f9e80
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions replace.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ func (r *Replacer) ReplaceGo(input string) (string, []Diff) {
s.Mode = scanner.ScanIdents | scanner.ScanFloats | scanner.ScanChars | scanner.ScanStrings | scanner.ScanRawStrings | scanner.ScanComments
lastPos := 0
output := ""
Loop:
Loop:
for {
switch s.Scan() {
case scanner.Comment:
Expand All @@ -161,7 +161,7 @@ func (r *Replacer) ReplaceGo(input string) (string, []Diff) {
// no changes, no copies
return input, nil
}
if lastPos < len(input){
if lastPos < len(input) {
output = output + input[lastPos:]
}
diffs := make([]Diff, 0, 8)
Expand All @@ -183,7 +183,6 @@ func (r *Replacer) ReplaceGo(input string) (string, []Diff) {

}


// Replace is corrects misspellings in input, returning corrected version
// along with a list of diffs.
func (r *Replacer) Replace(input string) (string, []Diff) {
Expand Down

0 comments on commit a5f9e80

Please sign in to comment.