github.com/sandwich-go/boost@v1.3.29/misc/goformat/README.md (about) 1 # goformat 2 3 `Golang` 代码/文件格式化 4 5 # 例子 6 7 ```go 8 var code = `func a( ) {return}` 9 out, err := ProcessCode([]byte(code), WithFragment(true)) 10 xpanic.WhenError(err) 11 fmt.Println(string(out)) 12 ``` 13 14 Output: 15 ```text 16 func a() { return } 17 ```