chore: reformat code (#2903)

Kevin Wan 2 years ago committed by kevin
parent b2646e228b
commit 21566f1b7a

@ -2,7 +2,6 @@ package api
import ( import (
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/zeromicro/go-zero/tools/goctl/api/apigen" "github.com/zeromicro/go-zero/tools/goctl/api/apigen"
"github.com/zeromicro/go-zero/tools/goctl/api/dartgen" "github.com/zeromicro/go-zero/tools/goctl/api/dartgen"
"github.com/zeromicro/go-zero/tools/goctl/api/docgen" "github.com/zeromicro/go-zero/tools/goctl/api/docgen"

@ -7,7 +7,6 @@ import (
"github.com/logrusorgru/aurora" "github.com/logrusorgru/aurora"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"github.com/zeromicro/go-zero/core/logx" "github.com/zeromicro/go-zero/core/logx"
"github.com/zeromicro/go-zero/tools/goctl/api/parser" "github.com/zeromicro/go-zero/tools/goctl/api/parser"
"github.com/zeromicro/go-zero/tools/goctl/util/pathx" "github.com/zeromicro/go-zero/tools/goctl/util/pathx"
) )

@ -21,5 +21,6 @@ func genRequest(dir string) error {
if pathx.FileExists(filename) { if pathx.FileExists(filename) {
return nil return nil
} }
return os.WriteFile(filename, []byte(requestTemplate), 0644) return os.WriteFile(filename, []byte(requestTemplate), 0644)
} }

@ -16,7 +16,6 @@ export type Method =
/** /**
* Parse route parameters for responseType * Parse route parameters for responseType
*
*/ */
const reg = /:[a-z|A-Z]+/g; const reg = /:[a-z|A-Z]+/g;
@ -75,6 +74,7 @@ export async function request({
// @ts-ignore // @ts-ignore
...config ...config
}); });
return response.json(); return response.json();
} }
@ -123,4 +123,4 @@ export const webapi = {
} }
}; };
export default webapi export default webapi

Loading…
Cancel
Save