Skip to content

Commit

Permalink
use go/format (#258)
Browse files Browse the repository at this point in the history
  • Loading branch information
dogancanbakir authored Sep 20, 2023
1 parent 2eb14e9 commit 8b5a952
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/versionbump/versionbump.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"flag"
"fmt"
"go/ast"
"go/format"
"go/parser"
"go/printer"
"go/token"
"os"
"path/filepath"
Expand Down Expand Up @@ -71,7 +71,7 @@ func bumpVersion(fileName, varName, part string) (string, string, error) {
}
defer f.Close()

if err := printer.Fprint(f, fset, node); err != nil {
if err := format.Node(f, fset, node); err != nil {
return oldVersion, newVersion, fmt.Errorf("could not write to file: %w", err)
}

Expand Down

0 comments on commit 8b5a952

Please sign in to comment.