summaryrefslogtreecommitdiffstats
path: root/common/text/position.go
diff options
context:
space:
mode:
Diffstat (limited to 'common/text/position.go')
-rw-r--r--common/text/position.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/text/position.go b/common/text/position.go
index cc1eda354..eb9de5624 100644
--- a/common/text/position.go
+++ b/common/text/position.go
@@ -24,6 +24,8 @@ import (
// Positioner represents a thing that knows its position in a text file or stream,
// typically an error.
type Positioner interface {
+ // Position returns the current position.
+ // Useful in error logging, e.g. {{ errorf "error in code block: %s" .Position }}.
Position() Position
}