following gofmt -s

This commit is contained in:
Jesse Portnoy
2023-07-17 14:26:19 +01:00
parent d9ba8dbabb
commit eb804a2dd6
3 changed files with 29 additions and 30 deletions
+1 -1
View File
@@ -4,9 +4,9 @@ import (
"bytes" "bytes"
"fmt" "fmt"
"io/ioutil" "io/ioutil"
"log"
"os" "os"
"strings" "strings"
"log"
"github.com/fatih/color" "github.com/fatih/color"
"github.com/jessp01/highlight" "github.com/jessp01/highlight"
+3 -4
View File
@@ -1,11 +1,11 @@
package highlight package highlight
import ( import (
"io/ioutil"
"path/filepath"
"regexp" "regexp"
"strings" "strings"
"unicode/utf8" "unicode/utf8"
"path/filepath"
"io/ioutil"
) )
// RunePos returns the rune index of a given byte index // RunePos returns the rune index of a given byte index
@@ -69,7 +69,7 @@ func ParseSyntaxFiles (dir string, defs *[]*Def) error{
return err return err
} }
for _, file_path := range(files){ for _, file_path := range files {
file, err := ioutil.ReadFile(file_path) file, err := ioutil.ReadFile(file_path)
if err != nil { if err != nil {
return err return err
@@ -228,7 +228,6 @@ func (h *Highlighter) highlightEmptyRegion(highlights LineMatch, start int, canM
return nil return nil
} }
if len(line) == 0 { if len(line) == 0 {
if canMatchEnd { if canMatchEnd {
h.lastRegion = nil h.lastRegion = nil