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)