Skip to content

Commit

Permalink
Merge pull request #441 from goplus/main
Browse files Browse the repository at this point in the history
v1.16.1
  • Loading branch information
xushiwei authored Oct 27, 2024
2 parents 250e767 + 47c09e3 commit a216441
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
Test:
strategy:
matrix:
go-version: [1.18.x, 1.21.x]
go-version: [1.19.x, 1.21.x]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/goplus/gogen

go 1.18
go 1.19

require golang.org/x/tools v0.19.0

Expand Down
2 changes: 1 addition & 1 deletion internal/go/printer/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ func stripCommonPrefix(lines []string) {
last := lines[len(lines)-1]
closing := "*/"
i := strings.Index(last, closing) // i >= 0 (closing is always present)
if isBlank(last[0:i]) {
if i >= 0 && isBlank(last[0:i]) {
// last line only contains closing */
if lineOfStars {
closing = " */" // add blank to align final star
Expand Down

0 comments on commit a216441

Please sign in to comment.