fix: fix(gctl): apiparser_parser auto format (#1607)

master
Fyn 3 years ago committed by GitHub
parent 6a66dde0a1
commit 0c35f39a7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -634,6 +634,3 @@ func NewSyntaxLitContext(parser antlr.Parser, parent antlr.ParserRuleContext, in
return p
}

@ -8,6 +8,7 @@ import (
"bufio"
"bytes"
"fmt"
"go/format"
"io/ioutil"
"log"
"os"
@ -61,7 +62,12 @@ import "github.com/zeromicro/antlr"
}
}
err = ioutil.WriteFile(fp, buffer.Bytes(), os.ModePerm)
src, err := format.Source(buffer.Bytes())
if err != nil {
fmt.Printf("%+v\n", err)
break
}
err = ioutil.WriteFile(fp, src, os.ModePerm)
if err != nil {
fmt.Printf("%+v\n", err)
}

Loading…
Cancel
Save