Skip to content
Permalink
Browse files
fix(internal/gensnippets): run goimports (#3931)
Updates #3916.
  • Loading branch information
tbpg committed Apr 14, 2021
1 parent 1204de8 commit 10050f05c20c226547d87c08168fa4bc551395c5
Showing with 9 additions and 0 deletions.
  1. +9 −0 internal/gensnippets/main.go
@@ -35,6 +35,7 @@ import (

"cloud.google.com/go/internal/godocfx/pkgload"
"cloud.google.com/go/third_party/go/doc"
"golang.org/x/sys/execabs"
)

func main() {
@@ -77,6 +78,14 @@ func main() {
}
}
}

if len(dirs) > 0 {
cmd := execabs.Command("goimports", "-w", ".")
cmd.Dir = *outDir
if err := cmd.Run(); err != nil {
log.Fatalf("failed to run goimports: %v", err)
}
}
}

func processExamples(pkg *doc.Package, fset *token.FileSet, trimPrefix, outDir string) error {

0 comments on commit 10050f0

Please sign in to comment.