Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions diagnostic.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down
2 changes: 1 addition & 1 deletion hclwrite/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions json/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
})
Expand Down Expand Up @@ -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(),
})
Expand Down
4 changes: 2 additions & 2 deletions json/public.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
})
}
}()
Expand All @@ -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),
},
}
}
Expand Down
6 changes: 3 additions & 3 deletions pos.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down