feat: support ctx in sqlx/sqlc, listed in ROADMAP (#1535)
* feat: support ctx in sqlx/sqlc * chore: update roadmap * fix: context.Canceled should be acceptable * use %w to wrap errors * chore: remove unused vars
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/zeromicro/go-zero/tools/goctl/util/pathx"
|
||||
)
|
||||
|
||||
// DocCommand generate markdown doc file
|
||||
// DocCommand generate Markdown doc file
|
||||
func DocCommand(c *cli.Context) error {
|
||||
dir := c.String("dir")
|
||||
if len(dir) == 0 {
|
||||
@@ -45,7 +45,7 @@ func DocCommand(c *cli.Context) error {
|
||||
for _, p := range files {
|
||||
api, err := parser.Parse(p)
|
||||
if err != nil {
|
||||
return fmt.Errorf("parse file: %s, err: %s", p, err.Error())
|
||||
return fmt.Errorf("parse file: %s, err: %w", p, err)
|
||||
}
|
||||
|
||||
api.Service = api.Service.JoinPrefix()
|
||||
|
||||
Reference in New Issue
Block a user