diff --git a/diagnostic.go b/diagnostic.go index 00d786452..c5a38ab27 100644 --- a/diagnostic.go +++ b/diagnostic.go @@ -173,10 +173,10 @@ type DiagnosticWriter interface { // // Diagnostic recipients which want to examine "Extra" values to sniff for // particular types of extra data can either type-assert this interface -// directly and repeatedly unwrap until they recieve nil, or can use the +// directly and repeatedly unwrap until they receive nil, or can use the // helper function DiagnosticExtra. type DiagnosticExtraUnwrapper interface { - // If the reciever is wrapping another "diagnostic extra" value, returns + // If the receiver is wrapping another "diagnostic extra" value, returns // that value. Otherwise returns nil to indicate dynamically that nothing // is wrapped. // diff --git a/hclwrite/node.go b/hclwrite/node.go index 2bb0149ca..86200aa92 100644 --- a/hclwrite/node.go +++ b/hclwrite/node.go @@ -59,7 +59,7 @@ func (n *node) Detach() { // currently in a list, this function will panic. // // The return value is the newly-constructed node, containing the given content. -// After this function returns, the reciever is no longer attached to a list. +// After this function returns, the receiver is no longer attached to a list. func (n *node) ReplaceWith(c nodeContent) *node { if n.list == nil { panic("can't replace node that is not in a list") diff --git a/json/parser.go b/json/parser.go index 9d5dfd213..2c02fed04 100644 --- a/json/parser.go +++ b/json/parser.go @@ -235,7 +235,7 @@ Token: recover(p.Read()) return nil, diags.Append(&hcl.Diagnostic{ Severity: hcl.DiagError, - Summary: "Missing attribute seperator comma", + Summary: "Missing attribute separator comma", Detail: "A comma must appear between each property definition in an object.", Subject: p.Peek().Range.Ptr(), }) @@ -338,7 +338,7 @@ Token: recover(p.Read()) return nil, diags.Append(&hcl.Diagnostic{ Severity: hcl.DiagError, - Summary: "Missing attribute seperator comma", + Summary: "Missing attribute separator comma", Detail: "A comma must appear between each value in an array.", Subject: p.Peek().Range.Ptr(), }) diff --git a/json/public.go b/json/public.go index 7229b4784..dcef0948e 100644 --- a/json/public.go +++ b/json/public.go @@ -108,7 +108,7 @@ func ParseFile(filename string) (rf *hcl.File, diags hcl.Diagnostics) { diags = append(diags, &hcl.Diagnostic{ Severity: hcl.DiagWarning, Summary: "Failed to close file", - Detail: fmt.Sprintf("The file %q was opened, but an error occured while closing it.", filename), + Detail: fmt.Sprintf("The file %q was opened, but an error occurred while closing it.", filename), }) } }() @@ -119,7 +119,7 @@ func ParseFile(filename string) (rf *hcl.File, diags hcl.Diagnostics) { { Severity: hcl.DiagError, Summary: "Failed to read file", - Detail: fmt.Sprintf("The file %q was opened, but an error occured while reading it.", filename), + Detail: fmt.Sprintf("The file %q was opened, but an error occurred while reading it.", filename), }, } } diff --git a/pos.go b/pos.go index f8d7d28c0..1fa113a1e 100644 --- a/pos.go +++ b/pos.go @@ -249,14 +249,14 @@ func (r Range) Overlap(other Range) Range { } // PartitionAround finds the portion of the given range that overlaps with -// the reciever and returns three ranges: the portion of the reciever that +// the receiver and returns three ranges: the portion of the receiver that // precedes the overlap, the overlap itself, and then the portion of the -// reciever that comes after the overlap. +// receiver that comes after the overlap. // // If the two ranges do not overlap then all three returned ranges are empty. // // If the given range aligns with or extends beyond either extent of the -// reciever then the corresponding outer range will be empty. +// receiver then the corresponding outer range will be empty. func (r Range) PartitionAround(other Range) (before, overlap, after Range) { overlap = r.Overlap(other) if overlap.Empty() {