all: Fix typos in function names and comments

This commit is contained in:
Oleksandr Redko
2023-05-22 20:11:12 +03:00
committed by Bjørn Erik Pedersen
parent 12dc9a6e4a
commit 9009c8cdca
27 changed files with 41 additions and 41 deletions

View File

@@ -33,7 +33,7 @@ type LineMatcher struct {
}
// LineMatcherFn is used to match a line with an error.
// It returns the column number or 0 if the line was found, but column could not be determinde. Returns -1 if no line match.
// It returns the column number or 0 if the line was found, but column could not be determined. Returns -1 if no line match.
type LineMatcherFn func(m LineMatcher) int
// SimpleLineMatcher simply matches by line number.

View File

@@ -297,7 +297,7 @@ func extractFileTypePos(err error) (string, text.Position) {
}
// The error type from the minifier contains line number and column number.
if line, col := exctractLineNumberAndColumnNumber(err); line >= 0 {
if line, col := extractLineNumberAndColumnNumber(err); line >= 0 {
pos.LineNumber = line
pos.ColumnNumber = col
return fileType, pos
@@ -369,7 +369,7 @@ func extractOffsetAndType(e error) (int, string) {
}
}
func exctractLineNumberAndColumnNumber(e error) (int, int) {
func extractLineNumberAndColumnNumber(e error) (int, int) {
switch v := e.(type) {
case *parse.Error:
return v.Line, v.Column

View File

@@ -118,7 +118,7 @@ func SafeCommand(name string, arg ...string) (*exec.Cmd, error) {
return exec.Command(bin, arg...), nil
}
// Exec encorces a security policy for commands run via os/exec.
// Exec enforces a security policy for commands run via os/exec.
type Exec struct {
sc security.Config

View File

@@ -209,7 +209,7 @@ func extractFilename(in, ext, base, pathSeparator string) (name string) {
// return the filename minus the extension (and the ".")
name = base[:strings.LastIndex(base, ".")]
} else {
// no extension case so just return base, which willi
// no extension case so just return base, which will
// be the filename
name = base
}