From 9c7157eb3a4192651b09fd0fe8d0581e27b49020 Mon Sep 17 00:00:00 2001 From: majun <3060162534@qq.com> Date: Mon, 2 Dec 2024 14:32:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/hello/hello.go | 15 --------------- api/hello/v1/hello.go | 12 ------------ internal/controller/hello/hello.go | 5 ----- internal/controller/hello/hello_new.go | 16 ---------------- internal/controller/hello/hello_v1_hello.go | 13 ------------- 5 files changed, 61 deletions(-) delete mode 100644 api/hello/hello.go delete mode 100644 api/hello/v1/hello.go delete mode 100644 internal/controller/hello/hello.go delete mode 100644 internal/controller/hello/hello_new.go delete mode 100644 internal/controller/hello/hello_v1_hello.go diff --git a/api/hello/hello.go b/api/hello/hello.go deleted file mode 100644 index 22743a0..0000000 --- a/api/hello/hello.go +++ /dev/null @@ -1,15 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package hello - -import ( - "context" - - "practice_Go/api/hello/v1" -) - -type IHelloV1 interface { - Hello(ctx context.Context, req *v1.HelloReq) (res *v1.HelloRes, err error) -} diff --git a/api/hello/v1/hello.go b/api/hello/v1/hello.go deleted file mode 100644 index b4dd233..0000000 --- a/api/hello/v1/hello.go +++ /dev/null @@ -1,12 +0,0 @@ -package v1 - -import ( - "github.com/gogf/gf/v2/frame/g" -) - -type HelloReq struct { - g.Meta `path:"/hello" tags:"Hello" method:"get" summary:"You first hello api"` -} -type HelloRes struct { - g.Meta `mime:"text/html" example:"string"` -} diff --git a/internal/controller/hello/hello.go b/internal/controller/hello/hello.go deleted file mode 100644 index f72082f..0000000 --- a/internal/controller/hello/hello.go +++ /dev/null @@ -1,5 +0,0 @@ -// ================================================================================= -// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish. -// ================================================================================= - -package hello diff --git a/internal/controller/hello/hello_new.go b/internal/controller/hello/hello_new.go deleted file mode 100644 index 29a0c36..0000000 --- a/internal/controller/hello/hello_new.go +++ /dev/null @@ -1,16 +0,0 @@ -// ================================================================================= -// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT. -// ================================================================================= - -package hello - -import ( - "practice_Go/api/hello" -) - -type ControllerV1 struct{} - -func NewV1() hello.IHelloV1 { - return &ControllerV1{} -} - diff --git a/internal/controller/hello/hello_v1_hello.go b/internal/controller/hello/hello_v1_hello.go deleted file mode 100644 index 04e0195..0000000 --- a/internal/controller/hello/hello_v1_hello.go +++ /dev/null @@ -1,13 +0,0 @@ -package hello - -import ( - "context" - "github.com/gogf/gf/v2/frame/g" - - "practice_Go/api/hello/v1" -) - -func (c *ControllerV1) Hello(ctx context.Context, req *v1.HelloReq) (res *v1.HelloRes, err error) { - g.RequestFromCtx(ctx).Response.Writeln("Hello World!") - return -}