Skip to content

Commit a8415d3

Browse files
committed
format: add a TODO to remind myself about token.File.Lines
1 parent 025a91f commit a8415d3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

format/format.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ func (f *fumpter) inlineComment(pos token.Pos) *ast.Comment {
217217
func (f *fumpter) addNewline(at token.Pos) {
218218
offset := f.Offset(at)
219219

220+
// TODO: replace with the new Lines method once we require Go 1.21 or later
220221
field := reflect.ValueOf(f.File).Elem().FieldByName("lines")
221222
n := field.Len()
222223
lines := make([]int, 0, n+1)

0 commit comments

Comments
 (0)