always format files
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
c27cf5982d
commit
e534860a0a
10
main.go
10
main.go
@ -1,6 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"go/format"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
@ -222,6 +224,14 @@ func main() {
|
||||
// Generate the protobufs
|
||||
g.GenerateAllFiles()
|
||||
|
||||
for _, f := range g.Response.File {
|
||||
fdata, err := format.Source([]byte(*f.Content))
|
||||
if err != nil {
|
||||
g.Error(err, fmt.Sprintf("failed to format output: %s", *f.Content))
|
||||
}
|
||||
*f.Content = string(fdata)
|
||||
}
|
||||
|
||||
data, err = proto.Marshal(g.Response)
|
||||
if err != nil {
|
||||
g.Error(err, "failed to marshal output proto")
|
||||
|
Loading…
Reference in New Issue
Block a user