diff --git a/protoc-gen-go-crud/deliveries/wire.go b/protoc-gen-go-crud/deliveries/wire.go index b1b3078..fe704db 100644 --- a/protoc-gen-go-crud/deliveries/wire.go +++ b/protoc-gen-go-crud/deliveries/wire.go @@ -4,7 +4,6 @@ import ( "fmt" "log" "os" - "path/filepath" "strings" "text/template" ) @@ -53,13 +52,13 @@ var ProviderSet = wire.NewSet({{ range $index, $element := .FunctionNames }}{{ i } // 文件检查 - dir := filepath.Dir(filename) - if _, err := os.Stat(dir); os.IsNotExist(err) { - err := os.MkdirAll(dir, 0755) - if err != nil { - log.Fatalf("failed to create directory: %v", err) - } - } + //dir := filepath.Dir(filename) + //if _, err := os.Stat(dir); os.IsNotExist(err) { + // err := os.MkdirAll(dir, 0755) + // if err != nil { + // log.Fatalf("failed to create directory: %v", err) + // } + //} // 检查文件是否存在,如果不存在则创建它 if _, err := os.Stat(filename); os.IsNotExist(err) { diff --git a/protoc-gen-go-crud/protoc-gen-go-crud b/protoc-gen-go-crud/protoc-gen-go-crud index e793bd4..bbc10eb 100755 Binary files a/protoc-gen-go-crud/protoc-gen-go-crud and b/protoc-gen-go-crud/protoc-gen-go-crud differ diff --git a/protoc-gen-go-crud/repositories/wire.go b/protoc-gen-go-crud/repositories/wire.go index 7fa83fd..b60a141 100644 --- a/protoc-gen-go-crud/repositories/wire.go +++ b/protoc-gen-go-crud/repositories/wire.go @@ -4,7 +4,6 @@ import ( "fmt" "log" "os" - "path/filepath" "strings" "text/template" ) @@ -52,13 +51,13 @@ var ProviderSet = wire.NewSet({{ range $index, $element := .FunctionNames }}{{ i } // 目录检查 - dir := filepath.Dir(filename) - if _, err := os.Stat(dir); os.IsNotExist(err) { - err := os.MkdirAll(dir, 0755) - if err != nil { - log.Fatalf("failed to create directory: %v", err) - } - } + //dir := filepath.Dir(filename) + //if _, err := os.Stat(dir); os.IsNotExist(err) { + // err := os.MkdirAll(dir, 0755) + // if err != nil { + // log.Fatalf("failed to create directory: %v", err) + // } + //} // 检查文件是否存在,如果不存在则创建它 if _, err := os.Stat(filename); os.IsNotExist(err) { diff --git a/protoc-gen-go-crud/usecase/wire.go b/protoc-gen-go-crud/usecase/wire.go index c99748c..831f4e2 100644 --- a/protoc-gen-go-crud/usecase/wire.go +++ b/protoc-gen-go-crud/usecase/wire.go @@ -4,7 +4,6 @@ import ( "fmt" "log" "os" - "path/filepath" "strings" "text/template" ) @@ -53,13 +52,13 @@ var ProviderSet = wire.NewSet({{ range $index, $element := .FunctionNames }}{{ i } // 目录检查 - dir := filepath.Dir(filename) - if _, err := os.Stat(dir); os.IsNotExist(err) { - err := os.MkdirAll(dir, 0755) - if err != nil { - log.Fatalf("failed to create directory: %v", err) - } - } + //dir := filepath.Dir(filename) + //if _, err := os.Stat(dir); os.IsNotExist(err) { + // err := os.MkdirAll(dir, 0755) + // if err != nil { + // log.Fatalf("failed to create directory: %v", err) + // } + //} // 检查文件是否存在,如果不存在则创建它 if _, err := os.Stat(filename); os.IsNotExist(err) {