.gitignore added
[dotfiles/.git] / .config / coc / extensions / coc-go-data / tools / pkg / mod / honnef.co / go / tools@v0.1.1 / debug / debug.go
diff --git a/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.1.1/debug/debug.go b/.config/coc/extensions/coc-go-data/tools/pkg/mod/honnef.co/go/tools@v0.1.1/debug/debug.go
new file mode 100644 (file)
index 0000000..d9fcfeb
--- /dev/null
@@ -0,0 +1,16 @@
+package debug
+
+import (
+       "fmt"
+       "go/token"
+
+       "golang.org/x/tools/go/analysis"
+)
+
+type Positioner interface {
+       Pos() token.Pos
+}
+
+func PrintPosition(pass *analysis.Pass, obj Positioner) {
+       fmt.Println(pass.Fset.PositionFor(obj.Pos(), false))
+}