1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-03-25 21:38:59 +02:00

chore: format import sort (#973)

Co-authored-by: quanlong <wangquanlong@joyme.sg>
This commit is contained in:
Richard 2021-05-31 19:40:16 +08:00 committed by GitHub
parent 156146036b
commit f51bd97324
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 5 deletions

View File

@ -3,13 +3,14 @@ package base
import ( import (
"bytes" "bytes"
"fmt" "fmt"
"github.com/fatih/color"
"io/ioutil" "io/ioutil"
"log" "log"
"os" "os"
"path" "path"
"path/filepath" "path/filepath"
"strings" "strings"
"github.com/fatih/color"
) )
func kratosHome() string { func kratosHome() string {

View File

@ -3,12 +3,13 @@ package project
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/fatih/color"
"os" "os"
"path" "path"
"github.com/AlecAivazis/survey/v2"
"github.com/go-kratos/kratos/cmd/kratos/v2/internal/base" "github.com/go-kratos/kratos/cmd/kratos/v2/internal/base"
"github.com/AlecAivazis/survey/v2"
"github.com/fatih/color"
) )
// Project is a project template. // Project is a project template.
@ -24,7 +25,7 @@ func (p *Project) New(ctx context.Context, dir string, layout string) error {
override := false override := false
prompt := &survey.Confirm{ prompt := &survey.Confirm{
Message: "📂 Do you want to override the folder ?", Message: "📂 Do you want to override the folder ?",
Help: "Delete the existing folder and create the project.", Help: "Delete the existing folder and create the project.",
} }
survey.AskOne(prompt, &override) survey.AskOne(prompt, &override)
if !override { if !override {

View File

@ -3,10 +3,10 @@ package project
import ( import (
"context" "context"
"fmt" "fmt"
"github.com/AlecAivazis/survey/v2"
"os" "os"
"time" "time"
"github.com/AlecAivazis/survey/v2"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@ -8,6 +8,7 @@ import (
"strings" "strings"
"github.com/go-kratos/kratos/cmd/kratos/v2/internal/base" "github.com/go-kratos/kratos/cmd/kratos/v2/internal/base"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@ -4,6 +4,7 @@ import (
"fmt" "fmt"
"github.com/go-kratos/kratos/cmd/kratos/v2/internal/base" "github.com/go-kratos/kratos/cmd/kratos/v2/internal/base"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )

View File

@ -6,6 +6,7 @@ import (
"github.com/go-kratos/kratos/cmd/kratos/v2/internal/project" "github.com/go-kratos/kratos/cmd/kratos/v2/internal/project"
"github.com/go-kratos/kratos/cmd/kratos/v2/internal/proto" "github.com/go-kratos/kratos/cmd/kratos/v2/internal/proto"
"github.com/go-kratos/kratos/cmd/kratos/v2/internal/upgrade" "github.com/go-kratos/kratos/cmd/kratos/v2/internal/upgrade"
"github.com/spf13/cobra" "github.com/spf13/cobra"
) )