Skip to content

Commit

Permalink
format: apply Go 1.19's gofmt
Browse files Browse the repository at this point in the history
It reformats godocs a bit.
  • Loading branch information
mvdan committed May 9, 2022
1 parent b5619f8 commit 1f45ac0
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions format/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,14 @@ func (f *fumpter) lineEnd(line int) token.Pos {

// rxCommentDirective covers all common Go comment directives:
//
// //go: | standard Go directives, like go:noinline
// //some-words: | similar to the syntax above, like lint:ignore or go-sumtype:decl
// //line | inserted line information for cmd/compile
// //export | to mark cgo funcs for exporting
// //extern | C function declarations for gccgo
// //sys(nb)? | syscall function wrapper prototypes
// //nolint | nolint directive for golangci
// //noinspection | noinspection directive for GoLand and friends
// //go: | standard Go directives, like go:noinline
// //some-words: | similar to the syntax above, like lint:ignore or go-sumtype:decl
// //line | inserted line information for cmd/compile
// //export | to mark cgo funcs for exporting
// //extern | C function declarations for gccgo
// //sys(nb)? | syscall function wrapper prototypes
// //nolint | nolint directive for golangci
// //noinspection | noinspection directive for GoLand and friends
//
// Note that the "some-words:" matching expects a letter afterward, such as
// "go:generate", to prevent matching false positives like "https://site".
Expand Down Expand Up @@ -873,11 +873,11 @@ func identEqual(expr ast.Expr, name string) bool {

// isCgoImport returns true if the declaration is simply:
//
// import "C"
// import "C"
//
// or the equivalent:
//
// import `C`
// import `C`
//
// Note that parentheses do not affect the result.
func isCgoImport(decl *ast.GenDecl) bool {
Expand Down

0 comments on commit 1f45ac0

Please sign in to comment.