mirror of
https://github.com/go-kratos/kratos.git
synced 2025-03-17 21:07:54 +02:00
refactor: format new.go (#885)
This commit is contained in:
parent
d85f5e9ae1
commit
21d9ff2c39
@ -9,7 +9,6 @@ import (
|
||||
"github.com/go-kratos/kratos/cmd/kratos/v2/internal/base"
|
||||
)
|
||||
|
||||
|
||||
// Project is a project template.
|
||||
type Project struct {
|
||||
Name string
|
||||
@ -21,7 +20,7 @@ func (p *Project) New(ctx context.Context, dir string, layout string) error {
|
||||
if _, err := os.Stat(to); !os.IsNotExist(err) {
|
||||
return fmt.Errorf("%s already exists", p.Name)
|
||||
}
|
||||
fmt.Printf("Creating service %s, layout repo is %s\n", p.Name,layout)
|
||||
fmt.Printf("Creating service %s, layout repo is %s\n", p.Name, layout)
|
||||
repo := base.NewRepo(layout)
|
||||
if err := repo.CopyTo(ctx, to, p.Name, []string{".git", ".github"}); err != nil {
|
||||
return err
|
||||
|
Loading…
x
Reference in New Issue
Block a user