From ba3f92dc116fdb2cc8cd71b86d8fa4be7b75e1b8 Mon Sep 17 00:00:00 2001 From: haiyux <99347745@qq.com> Date: Wed, 28 Jun 2023 00:32:43 +0800 Subject: [PATCH] fix lint --- .../internal/project/project_linux_test.go | 29 ------------------ .../internal/project/project_windows_test.go | 30 ------------------- 2 files changed, 59 deletions(-) delete mode 100644 cmd/kratos/internal/project/project_linux_test.go delete mode 100644 cmd/kratos/internal/project/project_windows_test.go diff --git a/cmd/kratos/internal/project/project_linux_test.go b/cmd/kratos/internal/project/project_linux_test.go deleted file mode 100644 index 868cdf026..000000000 --- a/cmd/kratos/internal/project/project_linux_test.go +++ /dev/null @@ -1,29 +0,0 @@ -//go:build linux -// +build linux - -package project - -import ( - "testing" -) - -func Test_processProjectParams(t *testing.T) { - type args struct { - projectName string - fallbackPlaceDir string - } - tests := []struct { - name string - args args - want string - }{ - {"absLinux", args{projectName: "/home/kratos/awesome/go/demo", fallbackPlaceDir: ""}, "/home/kratos/awesome/go"}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if _, got := processProjectParams(tt.args.projectName, tt.args.fallbackPlaceDir); got != tt.want { - t.Errorf("processProjectParams() = %v, want %v", got, tt.want) - } - }) - } -} diff --git a/cmd/kratos/internal/project/project_windows_test.go b/cmd/kratos/internal/project/project_windows_test.go deleted file mode 100644 index c86baf375..000000000 --- a/cmd/kratos/internal/project/project_windows_test.go +++ /dev/null @@ -1,30 +0,0 @@ -//go:build windows -// +build windows - -package project - -import ( - "testing" -) - -func Test_processProjectParams(t *testing.T) { - type args struct { - projectName string - fallbackPlaceDir string - } - tests := []struct { - name string - args args - want string - }{ - {"absWindows", args{projectName: "c:\\kratos\\awesome\\go\\demo", fallbackPlaceDir: ""}, "c:\\kratos\\awesome\\go"}, - //{"relativeWindows", args{projectName: "/home/kratos/awesome/go/demo", fallbackPlaceDir: ""}, "/home/kratos/awesome/go"}, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - if _, got := processProjectParams(tt.args.projectName, tt.args.fallbackPlaceDir); got != tt.want { - t.Errorf("getProjectPlaceDir() = %v, want %v", got, tt.want) - } - }) - } -}