ci: bump to go 1.19 (#330)
* Bump CI to Go 1.19 * Update golang/go edwards25519 test * Apply formatting to printer stubs output (to get correct comment formatting) * Bump gofumpt version
This commit is contained in:
committed by
GitHub
parent
e788b7675f
commit
429cf3cdbf
@@ -1,6 +1,8 @@
|
||||
package printer
|
||||
|
||||
import (
|
||||
"go/format"
|
||||
|
||||
"github.com/mmcloughlin/avo/buildtags"
|
||||
"github.com/mmcloughlin/avo/internal/prnt"
|
||||
"github.com/mmcloughlin/avo/ir"
|
||||
@@ -38,7 +40,16 @@ func (s *stubs) Print(f *ir.File) ([]byte, error) {
|
||||
}
|
||||
s.Printf("%s\n", fn.Stub())
|
||||
}
|
||||
return s.Result()
|
||||
|
||||
// Apply formatting to the result. This is the simplest way to ensure
|
||||
// comment formatting rules introduced in Go 1.19 are applied. See
|
||||
// https://go.dev/doc/comment.
|
||||
src, err := s.Result()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return format.Source(src)
|
||||
}
|
||||
|
||||
func (s *stubs) pragma(p ir.Pragma) {
|
||||
|
||||
Reference in New Issue
Block a user