summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorOleksandr Redko <Oleksandr_Redko@epam.com>2023-05-22 20:11:12 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2023-06-19 09:26:29 +0200
commit9009c8cdca448e50704f7ecd1a3918c5919b0f37 (patch)
tree960aaa2b80a07c959360ad66fc79ebe7c0fa9632 /common
parent12dc9a6e4acd5280a3e8b1658cbb96669fa97057 (diff)
all: Fix typos in function names and comments
Diffstat (limited to 'common')
-rw-r--r--common/herrors/error_locator.go2
-rw-r--r--common/herrors/file_error.go4
-rw-r--r--common/hexec/exec.go2
-rw-r--r--common/paths/path.go2
4 files changed, 5 insertions, 5 deletions
diff --git a/common/herrors/error_locator.go b/common/herrors/error_locator.go
index 7624bab98..b880fe045 100644
--- a/common/herrors/error_locator.go
+++ b/common/herrors/error_locator.go
@@ -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.
diff --git a/common/herrors/file_error.go b/common/herrors/file_error.go
index ae86a700c..f8bcecd34 100644
--- a/common/herrors/file_error.go
+++ b/common/herrors/file_error.go
@@ -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
diff --git a/common/hexec/exec.go b/common/hexec/exec.go
index 7a9fdd938..95e5162fc 100644
--- a/common/hexec/exec.go
+++ b/common/hexec/exec.go
@@ -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
diff --git a/common/paths/path.go b/common/paths/path.go
index f1992f196..5d211c5e0 100644
--- a/common/paths/path.go
+++ b/common/paths/path.go
@@ -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
}