update to latest golang.org/x dependencies

This commit is contained in:
Mechiel Lukkien
2024-04-28 13:53:37 +02:00
parent 8cc795b2ec
commit b3a693ee31
32 changed files with 18172 additions and 969 deletions

View File

@ -225,7 +225,7 @@ func (x *FileSyntax) Cleanup() {
if ww == 0 {
continue
}
if ww == 1 {
if ww == 1 && len(stmt.RParen.Comments.Before) == 0 {
// Collapse block into single line.
line := &Line{
Comments: Comments{

View File

@ -975,6 +975,8 @@ func (f *File) AddGoStmt(version string) error {
var hint Expr
if f.Module != nil && f.Module.Syntax != nil {
hint = f.Module.Syntax
} else if f.Syntax == nil {
f.Syntax = new(FileSyntax)
}
f.Go = &Go{
Version: version,