From a8415d36b4f301e30fbf2aec0f5699ccad3d3316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Mon, 25 Sep 2023 22:19:30 +0100 Subject: [PATCH] format: add a TODO to remind myself about token.File.Lines --- format/format.go | 1 + 1 file changed, 1 insertion(+) diff --git a/format/format.go b/format/format.go index 29c2cb3..9771d17 100644 --- a/format/format.go +++ b/format/format.go @@ -217,6 +217,7 @@ func (f *fumpter) inlineComment(pos token.Pos) *ast.Comment { func (f *fumpter) addNewline(at token.Pos) { offset := f.Offset(at) + // TODO: replace with the new Lines method once we require Go 1.21 or later field := reflect.ValueOf(f.File).Elem().FieldByName("lines") n := field.Len() lines := make([]int, 0, n+1)