mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-12 10:55:51 +02:00
enhance: update gonginx and cosy to latest version
This commit is contained in:
parent
af9395ad69
commit
85da74b3f0
39 changed files with 799 additions and 662 deletions
|
@ -10,9 +10,12 @@ func (c *NgxConfig) FmtCode() (fmtContent string) {
|
|||
return
|
||||
}
|
||||
|
||||
func FmtCode(content string) (fmtContent string) {
|
||||
func FmtCode(content string) (fmtContent string, err error) {
|
||||
p := parser.NewStringParser(content)
|
||||
c := p.Parse()
|
||||
c, err := p.Parse()
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
fmtContent = gonginx.DumpConfig(c, gonginx.IndentedStyle)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue